Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 3, 2026·3 min de lectura

shadcn-svelte — shadcn/ui for the Svelte Ecosystem

A Svelte port of shadcn/ui that lets you copy accessible, Tailwind-styled components directly into your SvelteKit project.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
shadcn-svelte
Comando de instalación directa
npx -y tokrepo@latest install c4c53fe4-7695-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

shadcn-svelte adapts the shadcn/ui model for Svelte and SvelteKit. Components are copied into your project as source files rather than installed as a package, giving you complete control over markup, styling, and behavior.

What shadcn-svelte Does

  • Ports the shadcn/ui component catalog to Svelte 5 and SvelteKit
  • Uses Bits UI primitives for accessible, headless component logic
  • Styles components with Tailwind CSS and configurable CSS variables
  • Provides a CLI for scaffolding, adding components, and managing dependencies
  • Ships TypeScript definitions for every component and utility

Architecture Overview

Each component wraps a Bits UI primitive (which handles keyboard navigation, ARIA attributes, and focus management) with Tailwind CSS classes. The CLI reads a components.json configuration that specifies paths, style options, and alias settings. Components land in your src/lib/components/ui directory as plain .svelte files you can freely edit.

Self-Hosting & Configuration

  • Run npx shadcn-svelte@latest init in a SvelteKit project to set up configuration
  • The CLI configures Tailwind, path aliases, and component output directories
  • Add components individually or in bulk with the add command
  • Customize themes by overriding CSS variables in your global CSS file
  • Compatible with SvelteKit, Vite, and standard Svelte setups

Key Features

  • Svelte 5 support with runes-based reactivity
  • Full WAI-ARIA compliance through Bits UI primitives
  • Light and dark mode via CSS custom properties
  • No runtime dependency on the library after components are copied
  • Active development tracking the React shadcn/ui component catalog

Comparison with Similar Tools

  • shadcn/ui (React) — the original project; shadcn-svelte mirrors its component set for Svelte
  • shadcn-vue — the Vue port; shadcn-svelte targets Svelte specifically
  • Skeleton UI — Svelte component library installed as a package; shadcn-svelte copies source code
  • Flowbite Svelte — Tailwind component library with Svelte bindings; shadcn-svelte offers code ownership
  • Melt UI — headless Svelte primitives; shadcn-svelte builds styled components on top of Bits UI

FAQ

Q: Does shadcn-svelte require SvelteKit? A: SvelteKit is recommended for the best experience, but components work in any Svelte project with the right build configuration.

Q: How do I update components after copying them? A: Re-run the CLI add command. It will prompt before overwriting existing files.

Q: Can I use shadcn-svelte with Svelte 4? A: The latest version targets Svelte 5. Earlier releases supported Svelte 4, but active development has moved forward.

Q: Is there a Figma design kit? A: The project does not maintain an official Figma kit, but community-contributed design files exist.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados