registry:style
Custom style that extends shadcn-svelte
The following registry item is a custom style that extends shadcn/ui. Onnpx shadcn-svelte@latest init, it will:
- Install
phosphor-svelteicons as a dependency. - Add the
login-01block andcalendarcomponent to the project. - Add the
editorfrom a remote registry. - Set the
font-sansvariable toInter, sans-serif. - Install a
brandcolor in light and dark mode.
example-style.json
Custom style from scratch
The following registry item is a custom style that doesn’t extend shadcn-svelte. See theextends: none field.
It can be used to create a new style from scratch i.e. custom components, css vars, dependencies, etc.
On npx shadcn-svelte@latest add, the following will:
- Install
tailwind-mergeandclsxas dependencies. - Add the
utilsregistry item from the shadcn-svelte registry. - Add the
button,input,label, andselectcomponents from a remote registry. - Install new css vars:
main,bg,border,text,ring.
example-style.json
registry:theme
Custom theme
example-theme.json
Custom colors
The following style will init using shadcn-svelte defaults and then add a custombrand color.
example-style.json
registry:block
Custom block
This blocks installs thelogin-01 block from the shadcn-svelte registry.
login-01.json
Install a block and override primitives
You can install a block from the shadcn-svelte registry and override the primitives using your custom ones. Onnpx shadcn-svelte@latest add, the following will:
- Add the
login-01block from the shadcn-svelte registry. - Override the
button,input, andlabelprimitives with the ones from the remote registry.
example-style.json
CSS Variables
Custom Theme Variables
Add custom theme variables to thetheme object.
example-theme.json
Override Tailwind CSS variables
example-theme.json
Add custom CSS
Base styles
example-base.json
Components
example-card.json
Add custom utilities
Simple utility
example-component.json
Complex utility
example-utility.json
Functional utilities
example-functional.json
Add custom animations
Note: you need to define both@keyframes in css and theme in cssVars to use animations.
example-component.json