shadcn
vercel-labs/json-render
36 pre-built shadcn/ui components for json-render with Radix UI + Tailwind CSS.
What is shadcn?
Provides catalog schemas and React implementations of shadcn/ui components for json-render. Use when building web UIs with json-render that need standard form inputs, layouts, navigation, overlays, and feedback components backed by Radix UI primitives and Tailwind CSS.
- Exports 36 shadcn/ui components across layout, navigation, overlay, content, feedback, and input categories
- Offers two entry points: catalog schemas (server-safe, no React) and React implementations
- Supports form validation with configurable timing (change, blur, submit) and validation rules
- Includes built-in state actions (setState, pushState, removeState, validateForm) handled automatically
- Allows mixing standard components with custom component definitions in the same catalog
How to install shadcn
npx skills add https://github.com/vercel-labs/json-render --skill shadcn- Tailwind CSS configured in your project
- @json-render/core and @json-render/react installed
- React 16.8+ for component implementations
How to use shadcn
- 1.Import component definitions from @json-render/shadcn/catalog and implementations from @json-render/shadcn
- 2.Create a catalog using defineCatalog, explicitly selecting only the components your app uses
- 3.Create a registry using defineRegistry, mapping each catalog component to its React implementation
- 4.Wrap your app with ActionProvider to handle built-in state actions automatically
- 5.Use the registry to render json-render schemas with your selected components
Use cases
- Building data-driven UIs with json-render that need standard form inputs and layouts
- Creating modal dialogs, drawers, tabs, and accordions for complex interactions
- Rendering data tables, carousels, and paginated content with pre-styled components
- Mixing shadcn/ui components with custom components in a single catalog
- Server-side prompt generation using catalog schemas without React dependencies
- Frontend developers using json-render with React
- Teams building component-driven UIs with Radix UI and Tailwind CSS
- Developers needing pre-built form validation and state management patterns
- AI agents generating UI schemas that need standard component definitions
shadcn FAQ
Yes. @json-render/shadcn/catalog exports only schemas with no React dependency, making it safe for server-side prompt generation.
No. Component implementations use bundled shadcn/ui primitives, not your app's components/ui/ folder. You only need Tailwind CSS configured.
Define custom components in the catalog with Zod schemas and descriptions, then provide React implementations in the registry alongside standard shadcnComponents.
Form inputs support 'checks' for validation rules and 'validateOn' to control timing: 'change' (default for Select/Checkbox/Radio/Switch), 'blur' (default for Input/Textarea), or 'submit'.
No. setState, pushState, removeState, and validateForm are built into the React schema and handled by ActionProvider automatically.
Full instructions (SKILL.md)
Source of truth, from vercel-labs/json-render.
name: shadcn description: Pre-built shadcn/ui components for json-render. Use when working with @json-render/shadcn, adding standard UI components to a catalog, or building web UIs with Radix UI + Tailwind CSS components.
@json-render/shadcn
Pre-built shadcn/ui component definitions and implementations for json-render. Provides 36 components built on Radix UI + Tailwind CSS.
Two Entry Points
| Entry Point | Exports | Use For |
|---|---|---|
@json-render/shadcn/catalog | shadcnComponentDefinitions | Catalog schemas (no React dependency, safe for server) |
@json-render/shadcn | shadcnComponents | React implementations |
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/react/schema";
import { shadcnComponentDefinitions } from "@json-render/shadcn/catalog";
import { defineRegistry } from "@json-render/react";
import { shadcnComponents } from "@json-render/shadcn";
// 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,
},
});
State actions (
setState,pushState,removeState) are built into the React schema and handled byActionProviderautomatically. No need to declare them.
Extending with Custom Components
Add custom components alongside standard ones:
const catalog = defineCatalog(schema, {
components: {
// Standard
Card: shadcnComponentDefinitions.Card,
Stack: shadcnComponentDefinitions.Stack,
// Custom
Metric: {
props: z.object({
label: z.string(),
value: z.string(),
trend: z.enum(["up", "down", "neutral"]).nullable(),
}),
description: "KPI metric display",
},
},
actions: {},
});
const { registry } = defineRegistry(catalog, {
components: {
Card: shadcnComponents.Card,
Stack: shadcnComponents.Stack,
Metric: ({ props }) => <div>{props.label}: {props.value}</div>,
},
});
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
Built-in Actions (from @json-render/react)
These are built into the React schema and handled by ActionProvider automatically. They appear in prompts without needing to be declared in the catalog.
- setState - Set a value at a state path (
{ statePath, value }) - pushState - Push a value onto an array (
{ statePath, value, clearStatePath? }) - removeState - Remove an array item by index (
{ statePath, index }) - validateForm - Validate all fields, write
{ valid, errors }to state ({ statePath? })
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 React dependency -- use it for server-side prompt generation - Components use Tailwind CSS classes -- your app must have Tailwind configured
- Component implementations use bundled shadcn/ui primitives (not your app's
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
Related skills
More from vercel-labs/json-render and the wider catalog.

shadcn-svelte
Pre-built shadcn-svelte components for json-render Svelte apps. Use when working with @json-render/shadcn-svelte, adding standard UI components to a Svelte catalog, or building Svelte web UIs with shadcn-svelte + Tailwind CSS components.

skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

solid
SolidJS renderer for json-render. Use when building @json-render/solid catalogs/registries, wiring Renderer providers, implementing bindings/actions, or troubleshooting Solid-specific reactivity patterns.

svelte
Svelte 5 renderer for json-render that turns JSON specs into Svelte component trees. Use when working with @json-render/svelte, building Svelte UIs from JSON, creating component catalogs, or rendering AI-generated specs.

vue
Vue 3 renderer for json-render. Use when building Vue UIs from JSON specs, working with @json-render/vue, defining Vue component registries, or rendering AI-generated specs in Vue.

xstate
XState Store adapter for json-render's StateStore interface. Use when integrating json-render with @xstate/store for state management via @json-render/xstate.