guides
Manual Installation
Set up cnippet ui without the CLI — dependencies, the cn helper, CSS tokens and your first component.
The CLI does all of this for you. Follow these steps if you want to see every file that changes, or if you can't run the CLI in your project.
Add Tailwind CSS
Components are styled with Tailwind CSS v4. Follow the Tailwind CSS installation guide for your framework.
Add dependencies
Some components need more packages (for example Calendar needs react-day-picker). Each component page lists them under Installation → Manual.
Configure the import alias
Components import each other through @/. Add the alias to tsconfig.json:
Use ["./src/*"] if your code lives in src/. Vite also needs the alias in vite.config.ts. See the Vite guide.
Add the cn helper
Every component uses cn to merge class names.
Configure styles
Replace your global stylesheet with the following. It's the same CSS that npx shadcn@latest init @cnippet/style writes.
Values like --alpha(var(--color-black) / 8%) are Tailwind CSS v4 functions. Tailwind compiles them, so they only work inside a stylesheet that Tailwind processes. Colors shows every token with a swatch.
Add fonts (optional)
The theme reads --font-sans, --font-heading and --font-mono and falls back to system fonts. cnippet ui uses Inter for text and Geist Mono for code. In Next.js:
Add components
Open a component page, for example Button, and choose Manual in the Installation section. Copy the source into components/ui/button.tsx and install the dependencies listed there.
Some components import others (a Dialog uses Button, for example). The Manual tab lists these too. Add them the same way.
Add a components.json (optional)
If you add a components.json, you can use the CLI later without running init again:
Set rsc to false if you don't use React Server Components, and tailwind.config stays empty for Tailwind CSS v4. See components.json for every field.