shadcn

Manages shadcn/ui components via CLI for adding, searching, styling, and composing React UI.

Updated May 23, 2026
One-click install
npx skills add https://github.com/kveperedo/website --skill shadcn-kveperedo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shadcn
Source: https://github.com/kveperedo/website/tree/main/.agents/skills/shadcn
Command: npx skills add https://github.com/kveperedo/website --skill shadcn-kveperedo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building consistent UI with shadcn/ui requires knowing the correct component APIs, composition patterns, Tailwind conventions, and CLI workflows. This Skill eliminates guesswork by injecting project context, enforcing critical styling and composition rules, and driving the shadcn CLI for component installation, updates, and preset management. ## Core Features & Use Cases - Component lifecycle management: Search registries, add components, preview changes with dry-run and diff, and smart-merge upstream updates while preserving local modifications. - Enforced UI conventions: Critical rules for forms (FieldGroup/Field), styling (semantic colors, gap spacing, size-*), icons (data-icon), and composition (Groups, Card structure, overlay titles) with Incorrect/Correct code pairs. - Preset and theme workflows: Apply, decode, and switch presets (overwrite, partial, merge, skip) and customize themes via CSS variables for Tailwind v3/v4. - Use Case: When asked to build a settings form in a React project, the Skill checks installed components, fetches docs via the CLI, and generates code using FieldGroup, ToggleGroup, and proper validation attributes instead of raw divs and manual state. ## Quick Start Ask the assistant to add a shadcn/ui component such as a dialog or build a settings form using shadcn/ui in the current project.

Frequently Asked Questions about shadcn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add shadcn/ui components to my project?▼

Run npx shadcn@latest add followed by component names, registry-prefixed names like @magicui/shimmer-button, or GitHub addresses like owner/repo/item. Use --dry-run to preview changes and --diff to compare against existing files before writing.

How do I update shadcn components without losing my local changes?▼

Run npx shadcn@latest add <component> --dry-run to see affected files, then --diff <file> to inspect upstream changes per file. Overwrite files with no local changes and manually merge files you have customized, preserving your modifications.

What is the difference between base and radix in shadcn/ui?▼

The base field in components.json determines the primitive library and component APIs. Radix uses asChild and type props, while base uses render, multiple booleans, items props on Select, and scalar Slider values. Check the base field via npx shadcn@latest info.

How do I apply or switch shadcn presets?▼

Use npx shadcn@latest apply <code> to overwrite an existing project with a preset, or init --preset <code> --force --no-reinstall to update only config and CSS. Presets accept named values like nova, base62 codes like a2r6bw, or URLs from ui.shadcn.com.

Why should I avoid space-y and raw Tailwind colors in shadcn/ui?▼

shadcn/ui conventions require flex with gap-* instead of space-x-*/space-y-* and semantic tokens like bg-primary or text-muted-foreground instead of raw colors like bg-blue-500. Semantic tokens handle dark mode automatically through CSS variables.

Can I use community registries with the shadcn CLI?▼

Yes, the CLI supports namespaced registries configured in components.json, public GitHub repos with a root registry.json via owner/repo addresses, and direct URLs. After adding third-party components, verify import aliases match your project configuration.