Overview
Welcome to rothko ui, a cutting-edge and lightweight UI component library designed to elevate your web development projects. rothko ui stands out from the crowd by offering a sleek and modern design aesthetic that aligns perfectly with the latest trends in UI/UX.
Setup
Prerequisites
Installation
Rothko ui is available on npm as @rothko-ui/react
. This single package contains all rothko ui components. The iconography library is separately available as @rothko-ui/icons
. Style tokens are available through @rothko-ui/tokens
.
bash
Registering Source Files
Adding Theme Tokens
You will need to add the theme tokens you installed in the first step.
Usage
After setting up you global.css
file, you can now import and use the components:
Philosophy
Compound components enhance UI library design by pairing a parent component with its children to create reusable, yet customizable, functional units. This pattern allows for implicit state management and a more expressive API, while also exposing the individual building blocks so users can style and arrange them as needed. Learn more about this powerful technique .
SSR / Next.js
In Next.js with Server-Side Rendering (SSR), components that utilize React Context from rothko-ui require the 'use client'
directive. This is because React Context relies on client-side rendering and is not supported in SSR.