Registry
Install components from a URL or a named registry.
The registry gives you editable source. Components and shared helpers install into the directories configured in your components.json.
Install from a URL
npx shadcn@latest add https://hextech-ui.vercel.app/r/button.jsonEach component page includes its install command in the Installation section. The address follows this site's NEXT_PUBLIC_SITE_URL configuration; the local preview uses http://127.0.0.1:3000 and must be running during installation.
Use a namespace
Add a registry mapping to components.json:
{
"registries": {
"@hextech-ui": "http://127.0.0.1:3000/r/{name}.json"
}
}Replace the local origin with your registry's address when self-hosting. Then install by name:
npx shadcn@latest add @hextech-ui/buttonFiles and dependencies
With the default src/ aliases, the CLI writes:
- Components to
src/components/ui. - Hooks to
src/hooksand shared helpers tosrc/lib. - Theme CSS to
src/styles.
Dependencies install with the component. Set "tsx": false in components.json for JavaScript output. Finish by importing the CSS as shown in Installation.
Registry installation is the current consumer path. The @hextech-ui/* npm packages are not published. For running or validating a registry locally, see Contributing.