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 298 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: @hairline/ and the component’s name. There is nothing to set up first: @hairline is listed in shadcn’s registry directory, so the CLI knows where to find it.
Several at once work too, and the CLI asks before it overwrites a file that is already there.
By URL
On a shadcn CLI before 3.0, or on a network that blocks ui.shadcn.com, install by the component’s registry URL instead. It is the same file.
To keep the short names working without the directory, add the registry to components.json yourself:
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.