
Shadcn Svelte Components
OfficialFreePre-built components for Svelte apps using Tailwind CSS.
Free · Opens the source repo
What Shadcn Svelte Components does
The @json-render/shadcn-svelte skill offers a collection of pre-built components specifically designed for use within Svelte applications. It includes 36 components that leverage Svelte 5 and Tailwind CSS, making it a valuable resource for developers looking to streamline their UI development process. By utilizing this skill, you can easily integrate standard UI components into your Svelte catalog or web applications, enhancing both productivity and design consistency.
This skill provides two entry points: one for catalog schemas that can be used on the server side without a Svelte dependency, and another for implementing Svelte components directly. The components cover a wide range of use cases, from layout and navigation to input and feedback, ensuring that you have the necessary building blocks to create a fully functional UI. The components are designed to be modular, allowing you to select only the ones you need, which helps in optimizing your application’s performance.
The skill is particularly useful for developers who are already working with Tailwind CSS and are building applications that require a cohesive look and feel. With components such as Cards, Buttons, and Tables, you can quickly assemble complex UIs without having to start from scratch. Additionally, the skill supports form validation, providing options for when validation occurs, which is essential for building user-friendly forms.
Overall, @json-render/shadcn-svelte is a practical tool for developers aiming to enhance their Svelte applications with ready-to-use components, reducing development time and improving the user experience.
When to use it
Use this skill when developing Svelte applications that require standard UI components, especially when utilizing Tailwind CSS.
When not to use it
This skill may not be suitable if you are not using Svelte or if you prefer to build custom components from scratch.
What you can build with it
Building a Svelte UI
Quickly assemble a user interface for your Svelte application using the pre-built components.
Creating a Component Catalog
Define a catalog of UI components for your application, selecting only the necessary components to optimize performance.
Implementing Form Validation
Utilize the form components with built-in validation options to enhance user input handling in your application.
How to install Shadcn Svelte Components
View source1. Install with the skills CLI
npx skills add vercel-labs/json-render/shadcn-svelte --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by vercel-labs@json-render/shadcn-svelte
Pre-built shadcn-svelte component definitions and implementations for json-render. Provides 36 components built on Svelte 5 + Tailwind CSS.
Two Entry Points
| Entry Point | Exports | Use For |
|---|---|---|
@json-render/shadcn-svelte/catalog | shadcnComponentDefinitions | Catalog schemas (no Svelte dependency, safe for server) |
@json-render/shadcn-svelte | shadcnComponents, shadcnComponentDefinitions | Svelte implementations + catalog schemas |
Usage Pattern
Pick the components you need from the standard definitions. Do not spread all definitions -- explicitly select what your app uses:
import { defineCatalog } from "@json-render/core";
import { schema } from "@json-render/svelte/schema";
import { shadcnComponentDefinitions } from "@json-render/shadcn-svelte/catalog";
import { defineRegistry } from "@json-render/svelte";
import { shadcnComponents } from "@json-render/shadcn-svelte";
// Catalog: pick definitions
const catalog = defineCatalog(schema, {
components: {
Card: shadcnComponentDefinitions.Card,
Stack: shadcnComponentDefinitions.Stack,
Heading: shadcnComponentDefinitions.Heading,
Button: shadcnComponentDefinitions.Button,
Input: shadcnComponentDefinitions.Input,
},
actions: {},
});
// Registry: pick matching implementations
const { registry } = defineRegistry(catalog, {
components: {
Card: shadcnComponents.Card,
Stack: shadcnComponents.Stack,
Heading: shadcnComponents.Heading,
Button: shadcnComponents.Button,
Input: shadcnComponents.Input,
},
});
Then render in your Svelte component:
<script lang="ts">
import { Renderer, JsonUIProvider } from "@json-render/svelte";
export let spec;
export let registry;
</script>
<JsonUIProvider initialState={spec?.state ?? {}}>
<Renderer {spec} {registry} />
</JsonUIProvider>
Available Components
Layout
- Card - Container with optional title, description, maxWidth, centered
- Stack - Flex container with direction, gap, align, justify
- Grid - Grid layout with columns (number) and gap
- Separator - Visual divider with orientation
Navigation
- Tabs - Tabbed navigation with tabs array, defaultValue, value
- Accordion - Collapsible sections with items array and type (single/multiple)
- Collapsible - Single collapsible section with title
- Pagination - Page navigation with totalPages and page
Overlay
- Dialog - Modal dialog with title, description, openPath
- Drawer - Bottom drawer with title, description, openPath
- Tooltip - Hover tooltip with content and text
- Popover - Click-triggered popover with trigger and content
- DropdownMenu - Dropdown with label and items array
Content
- Heading - Heading text with level (h1-h4)
- Text - Paragraph with variant (body, caption, muted, lead, code)
- Image - Image with alt, width, height
- Avatar - User avatar with src, name, size
- Badge - Status badge with text and variant (default, secondary, destructive, outline)
- Alert - Alert banner with title, message, type (success, warning, info, error)
- Carousel - Scrollable carousel with items array
- Table - Data table with columns (string[]) and rows (string[][])
Feedback
- Progress - Progress bar with value, max, label
- Skeleton - Loading placeholder with width, height, rounded
- Spinner - Loading spinner with size and label
Input
- Button - Button with label, variant (primary, secondary, danger), disabled
- Link - Anchor link with label and href
- Input - Text input with label, name, type, placeholder, value, checks
- Textarea - Multi-line input with label, name, placeholder, rows, value, checks
- Select - Dropdown select with label, name, options (string[]), value, checks
- Checkbox - Checkbox with label, name, checked, checks, validateOn
- Radio - Radio group with label, name, options (string[]), value, checks, validateOn
- Switch - Toggle switch with label, name, checked, checks, validateOn
- Slider - Range slider with label, min, max, step, value
- Toggle - Toggle button with label, pressed, variant
- ToggleGroup - Group of toggles with items, type, value
- ButtonGroup - Button group with buttons array and selected
Validation Timing (validateOn)
All form components support validateOn to control when validation runs:
"change"-- validate on every input change (default for Select, Checkbox, Radio, Switch)"blur"-- validate when field loses focus (default for Input, Textarea)"submit"-- validate only on form submission
Important Notes
- The
/catalogentry point has no Svelte dependency -- use it for server-side prompt generation - Components use Tailwind CSS classes -- your app must have Tailwind configured
- Component implementations use bundled shadcn-svelte primitives (not your app's
$lib/components/ui/) - All form inputs support
checksfor validation (type + message pairs) andvalidateOnfor timing - Events: inputs emit
change/submit/focus/blur; buttons emitpress; selects emitchange/select
Frequently asked questions about Shadcn Svelte Components
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
