Browse the docs
Installation
Pick your framework, then your package manager. The steps take about a minute.
1. Create a project
Skip this if you already have a Next.js app with Tailwind CSS v4.
npx create-next-app@latestChoose TypeScript, Tailwind CSS and the
@/* import alias when asked.2. Run init
This detects your project, writes nook.json and installs the tokens and the cn() helper.
npx nook-ui@latest init3. Add components
npx nook-ui@latest add button card dialogThen import them:
import { Button } from "@/components/ui/button";
export default function Page() {
return <Button>Hello, Nook</Button>;
}Theme only, no components
init only installs the tokens and the cn() helper. If you do not run add, you get the theme system and its Tailwind utilities (bg-primary, rounded-lg, h-control) and nothing else.
Dark mode
Nook switches to its dark palette when an ancestor has the dark class, usually <html class="dark">. You decide how to toggle it.
What init changes
- Creates
nook.jsonat the project root. - Adds two marked blocks to your global CSS file:
nook:tokensandnook:theme. Everything outside the markers is left alone. - Adds
lib/utils.tsand installsclsxandtailwind-mergewith your package manager.
Nook always asks before overwriting a file that already exists. Use --dry-run to preview any command.