Installation
Every component installs with the shadcn CLI into your own components folder, as source you can read and change. Set up shadcn/ui once, then add any of the 121 with one command.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
Any shadcn style works: the components read its theme variables, so they look like the rest of your app in light and dark. They don’t need a provider, a runtime or an animation library. See Theming for the tokens they read.
Next.js
- 01
Create the app
Skip this if you have one. Pick Tailwind CSS when it asks.
- 02
Set up shadcn/ui
It writes components.json and the theme variables into your global CSS.
- 03
Add a component
- 04
Use it
app/page.tsx4 lines
Components that move or listen are client components (they start with "use client"), so you can import them straight into a server page.
Vite
Follow shadcn’s Vite guide to add Tailwind CSS v4 and the @/ import alias, then run shadcn init. From there it is the same command as Next.js. Nothing here depends on Next.js: no server components, no router, no next/image.
Add a component
Each component page has its command under the preview. They all follow one pattern: the registry URL of the component.
Several at once work too, and the CLI asks before it overwrites a file that is already there.
The @hairline namespace
Register the library once in components.json and install by name instead of by URL. Your coding agent reads the same file.
What the CLI adds
- The component file in
components/, plus its supporting files when it has them (a drag hook, a parser), so the install is complete. - Other components it builds on. Status button brings Text morph; Pricing toggle brings Number roll. Each page lists them under Requirements.
- The keyframes it uses, added to your global CSS once. They are all named
ui-*, so they don’t clash with yours. - npm packages, only when a component needs one, such as
lucide-reactfor icons.
By hand
Every component page shows its full source under Source. Copy each file into your components folder, then copy the keyframes it names from the registry item (/r/<name>.json, under css) into your global CSS.
With your coding agent
Connect Claude Code, Codex, Cursor or any MCP client and ask for what you need. Your agent finds the component, reads its props and runs the same install command.
Setup for every other client is on the MCP page. Agents that browse instead can read /llms.txt or any component as markdown.