You can use the shadcn-svelte CLI to run your own component registry. Running your own
component registry allows you to distribute your custom components, hooks, pages, and
other files to any Svelte project.
This is a template for creating a custom registry using SvelteKit.
- The template uses a
registry.jsonfile to define components and their files. - The
shadcn-svelte buildcommand is used to build the registry. - The registry items are served as static files under
public/r/[name].json. - Every registry item is compatible with the
shadcn-svelteCLI. - The
card,button,input,label,textareacomponents here would come from theshadcn-svelteregistry, but thesteppercomponent is a customuicomponent you can use as a reference for creating and referencing "local"uicomponents.
Important
Don't forget to replace the version of shadcn-svelte in the package.json file with the version you want to use.
Visit the shadcn-svelte documentation to view the full documentation.