shadcn-ui v2.0 introduced the possibility of fetching components from custom registries, that's why this components book was born.
As did by shadcn-ui, components are organized by styles under the registry
folder.
But I modify the structure, files are structured as follows:
registry
├── components
├──── atoms
├──── molecules
├──── organisms
├──── templates
├──── pages
├── hooks
└── lib
registry/<type>/<scope>/<name>.stories.tsx
for components and registry/<type>/<name>.stories.tsx
for hook and lib (e.g. button.stories.tsx)pnpm build:registry
to generate the registry file.You can install your custom components by running
npx shadcn-ui@latest add {.storybook-url}/r/{component-id}.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:6006
.