You can add components automatically with the shadcn CLI or manually by copying the files.
Each component page provides a command to add it to your project automatically. The CLI will create the necessary files and install any dependencies for you.
For new projects, use the herocn style preset to initialize everything in one command:
pnpm dlx shadcn@latest init https://herocn.dev/r/style.jsonThis installs all UI components and the color system.
To add components to an existing project:
pnpm dlx shadcn@latest add https://herocn.dev/r/ui.jsonThis adds all UI primitives (button, card, avatar, dialog, tabs, and more). For the full theme including colors, sidebar, and fonts:
pnpm dlx shadcn@latest add https://herocn.dev/r/style.jsonThis installs all UI components and the color system (it might override your colors)
components/ui/button.tsx) and paste the code.