Skip to content
ReactHive

Docs

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:

Terminal
npx shadcn@latest add @reacthive/card-pack

It 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:

Terminal
npx shadcn@latest add @reacthive/shoal @reacthive/lens-slider
components.json
{
  "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:

Terminal
npx shadcn@latest add https://reacthive.dev/r/card-pack.json

Find and Preview

Search the registry, or look at a component before you install it:

Terminal
npx shadcn@latest search @reacthive -q drag
npx shadcn@latest view @reacthive/card-pack

Or 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.

ComponentFiles
sticker-trailcomponents/reacthive/sticker-trail/sticker-trail.tsx, components/reacthive/sticker-trail/stickers.ts
sticker-bombcomponents/reacthive/sticker-bomb/sticker-bomb.tsx, components/reacthive/sticker-bomb/stickers.ts
reel-revealcomponents/reacthive/reel-reveal/reel-reveal.tsx, components/reacthive/reel-reveal/morph.ts
morph-gallerycomponents/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:

Terminal
npx shadcn@latest add @reacthive/card-pack --diff
npx shadcn@latest add @reacthive/card-pack --overwrite

Troubleshooting

  • “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 init in your project's root first.
  • Type errors after installing: the components use React 19 types; update react, react-dom and @types/react.
  • Behind a company proxy: the CLI fetches from reacthive.dev, so the address needs to be reachable from your terminal.

Built Something With Them?

We'd love to see it, and to hear what you'd like next. Or start from a whole site.

Start a Project

Tell us what you're making. A few lines is plenty; we'll ask the rest on a call.

What do you need?
Rough budget (optional)

Or email projects@reacthive.dev