Skip to main content

registry:style

Custom style that extends shadcn-svelte

The following registry item is a custom style that extends shadcn/ui. On npx shadcn-svelte@latest init, it will:
  • Install phosphor-svelte icons as a dependency.
  • Add the login-01 block and calendar component to the project.
  • Add the editor from a remote registry.
  • Set the font-sans variable to Inter, sans-serif.
  • Install a brand color 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 the extends: 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-merge and clsx as dependencies.
  • Add the utils registry item from the shadcn-svelte registry.
  • Add the button, input, label, and select components 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 custom brand color.
example-style.json

registry:block

Custom block

This blocks installs the login-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. On npx shadcn-svelte@latest add, the following will:
  • Add the login-01 block from the shadcn-svelte registry.
  • Override the button, input, and label primitives with the ones from the remote registry.
example-style.json

CSS Variables

Custom Theme Variables

Add custom theme variables to the theme 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