CLI
Install any component with the shadcn CLI: one command, and the files are in your project.
ReactHive serves its components as a shadcn registry, listed in shadcn's registry directory, so the shadcn CLI knows it by name. You only need a components.json in your project: Installation covers it.
Install by Name
One command, nothing to configure:
npx shadcn@latest add @reacthive/card-packIt creates components/reacthive/card-pack/card-pack.tsx with the licence beside it, adds anything else the component needs, and prints how to use it. Add as many as you like at once:
npx shadcn@latest add @reacthive/shoal @reacthive/lens-slider{
"registries": {
"@reacthive": "https://reacthive.dev/r/{name}.json"
}
}Install by Address
Every component also has its own address, https://reacthive.dev/r/<name>.json. Use it with a CLI version from before the directory listing, or anywhere the name doesn't resolve:
npx shadcn@latest add https://reacthive.dev/r/card-pack.jsonFind and Preview
Search the registry, or look at a component before you install it:
npx shadcn@latest search @reacthive -q drag
npx shadcn@latest view @reacthive/card-packOr browse them all, with live demos, on /components. The full list is at reacthive.dev/r/registry.json.
Where Files Go
Into your components folder (the components alias in components.json), under reacthive/<name>/. A component with a helper keeps it beside it, so its imports work wherever your components live, src/ folder or not.
| Component | Files |
|---|---|
| sticker-trail | components/reacthive/sticker-trail/sticker-trail.tsx, components/reacthive/sticker-trail/stickers.ts |
| sticker-bomb | components/reacthive/sticker-bomb/sticker-bomb.tsx, components/reacthive/sticker-bomb/stickers.ts |
| reel-reveal | components/reacthive/reel-reveal/reel-reveal.tsx, components/reacthive/reel-reveal/morph.ts |
| morph-gallery | components/reacthive/morph-gallery/morph-gallery.tsx, components/reacthive/morph-gallery/morph.ts |
JavaScript Projects
Set "tsx": false in components.json and the CLI writes JavaScript instead. The code on each component's page also has a JavaScript switch.
Updating
To see what changed in a component since you installed it, then take the new version:
npx shadcn@latest add @reacthive/card-pack --diff
npx shadcn@latest add @reacthive/card-pack --overwriteTroubleshooting
- “not found”: check the name against /components (names are lowercase, with hyphens), and run the CLI as
shadcn@latest: older versions don't know the directory. Installing by address always works. - No components.json: run
npx shadcn@latest initin your project's root first. - Type errors after installing: the components use React 19 types; update
react,react-domand@types/react. - Behind a company proxy: the CLI fetches from reacthive.dev, so the address needs to be reachable from your terminal.