This skill should be used when the user asks to "set up shadcn", "configure shadcn", "shadcn project setup", "install shadcn", "shadcn init", "ui components for react", or mentions general shadcn/ui configuration questions. For specific topics like theming, forms, or data tables, focused skills may be more appropriate.
From shadcn-devnpx claudepluginhub nthplusio/functional-claude --plugin shadcn-devThis skill uses the workspace's default tool permissions.
references/community-repositories.mdreferences/component-patterns.mdConfigure and build React applications with shadcn/ui components and Tailwind CSS v4.
shadcn/ui is not a component library - it's a collection of reusable components that are copied directly into projects. Components are:
npx shadcn@latest init
Configuration prompts:
# Single component
npx shadcn@latest add button
# Multiple components
npx shadcn@latest add button card dialog
# All components
npx shadcn@latest add --all
After initialization:
project/
├── components/
│ └── ui/ # shadcn components
│ ├── button.tsx
│ ├── card.tsx
│ └── ...
├── lib/
│ └── utils.ts # cn() utility
├── components.json # shadcn config
└── app/
└── globals.css # CSS variables + Tailwind
Located in lib/utils.ts, combines clsx and tailwind-merge:
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
Use for conditional and merged class names:
<Button className={cn("w-full", isLoading && "opacity-50")} />
For specific topics, use these focused skills:
| Topic | Skill | Trigger Phrases |
|---|---|---|
| Component Usage | /shadcn-dev:shadcn-components | "add button", "dialog component", "card usage" |
| Theming | /shadcn-dev:shadcn-theming | "dark mode", "custom colors", "css variables" |
| Forms | /shadcn-dev:shadcn-forms | "form validation", "react-hook-form", "zod" |
| Data Tables | /shadcn-dev:shadcn-data-tables | "data table", "tanstack table", "sortable" |
| Tailwind v4 | /shadcn-dev:tailwindv4 | "tailwind v4", "@theme", "css-first config" |
For debugging issues, the shadcn-troubleshoot agent can autonomously diagnose and fix common problems including:
npx create-next-app@latest my-app --typescript --tailwind
cd my-app
npx shadcn@latest init
npm create vite@latest my-app -- --template react-ts
cd my-app
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npx shadcn@latest init
npx create-tanstack-start my-app
cd my-app
npx shadcn@latest init
See the Expo-specific setup guide in shadcn docs for React Native Web integration.
shadcn/ui components typically require:
tailwindcss - Styling@radix-ui/* - Accessible primitivesclass-variance-authority - Variant managementclsx - Conditional classestailwind-merge - Class deduplicationlucide-react - Iconsreferences/community-repositories.md - Top 10 community repos for learningreferences/component-patterns.md - Common composition patternsSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.