shadcn-ui v2.0 introduced the possibility of fetching components from custom registries, that's why this template was born.
As did by shadcn-ui, components are organized by styles under the registry
folder.
Files are structured as follows:
registry
├── default
│ ├── hooks
│ ├── lib
│ ├── themes
│ └── ui
└── <your-style>
├── <custom-registry-name>
└── ui
- As did for the accordion, add your component under the
registry
folder. - Register your component in the
registry-<scope>.ts
(eg.registry-ui.ts
for components,registry-themes.ts
for themes, etc.) - Run
pnpm build:registry
to generate theregistry.ts
file.
You can install your custom components by running
npx shadcn@latest add {app-url}/r/styles/{style-name}/{component-name}.json
This app simple homepage was thought for simplify the process of building the registry url.
In order to see it in action locally, run pnpm dev
and navigate to http://localhost:3000
.