Search documentation

Search the documentation and open a page.

Set up your Svelte project and add your first Kit component.

Set up your project, install the required packages, and add your first component.

Set up your project

Configure Tailwind CSS

Components use Tailwind CSS classes. Install Tailwind CSS for your framework before continuing.

Install the dependencies

Install the packages used by components from your project root:

pnpm add @wirekyt/dom @wirekyt/svelte @internationalized/date class-variance-authority cn date-fns @lucide/svelte shadcn simple-icons tw-animate-css

Create a components.json file

Create components.json in the root of your project and connect the WireKyt registry:

{ "$schema": "https://ui.shadcn.com/schema.json", "aliases": { "components": "@/components", "hooks": "@/hooks", "lib": "@/lib", "ui": "@/components/ui", "utils": "@/lib/utils" }, "registries": { "@wirekyt": "https://wirekyt.com/svelte/r/{name}.json" }, "rsc": false, "style": "plain", "tailwind": { "baseColor": "neutral", "css": "src/app.css", "cssVariables": true }, "tsx": false }

Configure TypeScript paths

Add the source alias to compilerOptions in your tsconfig.json file:

{ "compilerOptions": { "paths": { "@/*": ["./src/*"] } } }

Change ./src/* if your source files live somewhere else.

Create your CSS file

Copy the styles below into the CSS file configured in components.json:

@import "tailwindcss"; @import "tw-animate-css"; @import "shadcn/tailwind.css"; @custom-variant dark (&:is(.dark *)); @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-fill-subtle: var(--fill-subtle); --color-fill-default: var(--fill-default); --color-fill-hover: var(--fill-hover); --color-fill-active: var(--fill-active); --color-field: var(--field); --color-field-border: var(--field-border); --color-raised: var(--raised); --color-control: var(--control); --color-control-border: var(--control-border); --color-control-hover: var(--control-hover); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --radius-sm: var(--rounding-sm); --radius-md: var(--rounding-md); --radius-lg: var(--rounding-lg); --radius-xl: var(--rounding-xl); --radius-2xl: var(--rounding-2xl); --radius-3xl: var(--rounding-3xl); --radius-4xl: var(--rounding-4xl); --shadow-card: var(--elevation-card); --shadow-dialog: var(--elevation-dialog); --shadow-popover: var(--elevation-popover); } :root { --background: oklch(0.9925 0 0); --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); --primary: oklch(0.585 0.233 277.117); --primary-foreground: oklch(1 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.145 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.4975 0 0); --accent: oklch(0.556 0 0 / 8%); --accent-foreground: oklch(0.145 0 0); --destructive: oklch(0.637 0.237 25.331); --destructive-foreground: oklch(0.505 0.213 27.518); --fill-subtle: oklch(0.556 0 0 / 5%); --fill-default: oklch(0.556 0 0 / 8%); --fill-hover: oklch(0.556 0 0 / 12%); --fill-active: oklch(0.556 0 0 / 16%); --field: oklch(0.556 0 0 / 2.5%); --field-border: oklch(0.145 0 0 / 10%); --raised: oklch(1 0 0); --control: oklch(1 0 0); --control-border: oklch(0.145 0 0 / 10%); --control-hover: oklch(0.9925 0 0); --border: oklch(0.145 0 0 / 10%); --input: oklch(0.145 0 0 / 10%); --ring: oklch(0.708 0 0); --rounding-sm: 0.375rem; --rounding-md: 0.5rem; --rounding-lg: 0.625rem; --rounding-xl: 0.75rem; --rounding-2xl: 1rem; --rounding-3xl: 1.25rem; --rounding-4xl: 1.5rem; --elevation-card: 0 1px 2px oklch(0 0 0 / 6%); --elevation-dialog: 0 20px 25px -5px oklch(0 0 0 / 10%); --elevation-popover: 0 10px 15px -3px oklch(0 0 0 / 10%); } .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); --card: oklch(0.205 0 0); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.237 0 0); --popover-foreground: oklch(0.985 0 0); --primary: oklch(0.585 0.233 277.117); --primary-foreground: oklch(1 0 0); --secondary: oklch(0.182 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.205 0 0); --muted-foreground: oklch(0.708 0 0); --accent: oklch(1 0 0 / 10%); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.637 0.237 25.331); --destructive-foreground: oklch(0.704 0.191 22.216); --fill-subtle: oklch(1 0 0 / 5%); --fill-default: oklch(1 0 0 / 10%); --fill-hover: oklch(1 0 0 / 14%); --fill-active: oklch(1 0 0 / 18%); --field: oklch(1 0 0 / 2.5%); --field-border: oklch(1 0 0 / 15%); --raised: oklch(1 0 0 / 10%); --control: oklch(0.269 0 0); --control-border: oklch(1 0 0 / 10%); --control-hover: oklch(0.237 0 0); --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 10%); --ring: oklch(0.556 0 0); } @layer base { * { @apply border-border outline-ring/50; } html { @apply font-sans; } body { @apply bg-background text-foreground; } }

That's it

You can now add your first component:

pnpm dlx shadcn@latest add @wirekyt/button

Use the generated component from the alias configured above:

<script lang="ts"> import { Button } from "@/components/ui/button"; </script> <Button>Continue</Button>

Browse the component library to add more components. Each component page includes a CLI command, manual installation steps, examples, and its API.