shadcn-ui
Skill0 starsChanged 5 months agoMITView on GitHub
Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.
41 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- podo/design-agent-skillstheir own version, first seen Nov 8, 2026
- delorenj/skillsedited, first seen Nov 7, 2026
- JuankCadavid/akili-specstheir own version, first seen Nov 2, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- jasonfesta/design-agentstheir own version, first seen Oct 15, 2026
- klauswg/sasukeword for word, first seen Oct 15, 2026
Used with
Projects with it also use i18n-translate, shader-dev and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
lien0219Skilli18n-translate
Complete and maintain frontend i18n translations for this project. Covers finding missing translation keys, detecting untranslated entries, and adding translations for all supported locales (en, zh, fr, ja, ru, vi). Use when the user asks to add translations, fix i18n, complete missing translations, or when new UI text needs to be internationalized.
Also in 4 projects that use this
HK-hubSkillshader-dev
Comprehensive GLSL shader techniques for creating stunning visual effects — ray marching, SDF modeling, fluid simulation, particle systems, procedural generation, lighting, post-processing, and more.
Also in 4 projects that use this
OpenAISkillfigma-create-new-file
Create a new blank Figma file. Use when the user wants to create a new Figma design or FigJam file, or when you need a new file before calling use_figma. Handles plan resolution via whoami if needed. Usage — /figma-create-new-file [editorType] [fileName] (e.g. /figma-create-new-file figjam My Whiteboard)
Also in 3 projects that use this
nilecuiSkillapi-design-principles
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
Also in 4 projects that use this
xfstudioSkilltailwind-design-system
Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.
Also in 4 projects that use this
OpenAISkillnextjs
Next.js App Router expert guidance. Use when building, debugging, or architecting Next.js applications — routing, Server Components, Server Actions, Cache Components, layouts, middleware/proxy, data fetching, rendering strategies, and deployment on Vercel.
Also in 4 projects that use this
- +1 more from openai
Other versions41 projects use a version of this.
Word for word · 8
- ExplosiveCoderflome/AI-Novel-Writing-Assistant★ 3.4k100% same
- diodeme/Gold-Band★ 164100% same
- RootCX/RootCX★ 49100% same
- klauswg/sasuke★ 17100% same
- HK-hub/AgentSkills★ 6100% same
- idexal/idexal-skills★ 2100% same
- jaron-goh-centr/claude-skills★ 0100% same
- minhtrung0110/wp-test-tool★ 0100% same
Edited · 1
- delorenj/skills★ 1799% same
Wrote their own version · 32
- QuantumNous/new-api★ 52ksame name
- BuilderIO/agent-native★ 7.6ksame name
- codedogQBY/ReadAny★ 2.7ksame name
- shep-ai/shep★ 277same name
- mweinbach/agent-coworker★ 157same name
- nahid-sparktales/agent-dispatcher★ 59same name
- faqndo97/ai-skills★ 33same name
- podo/design-agent-skills★ 32same name
- wpank/ai★ 11same name
- JuankCadavid/akili-specs★ 10same name
22 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- find-skillsSkill
- notebooklmSkill
- stitch::code-to-designSkill
- design-mdSkill
- doc-coauthoringSkill
- enhance-promptSkill
- stitch::extract-design-mdSkill
- stitch::extract-static-htmlSkill
- frontend-designSkill
- stitch::generate-designSkill
- hatch-petSkill
- impeccableSkill
- internal-commsSkill
- karpathy-guidelinesSkill
- stitch::manage-design-systemSkill
- mcp-builderSkill
- product-engineering-auditorSkill
- react:componentsSkill
- remotionSkill
- stitch-loopSkill
- taste-designSkill
- design-taste-frontendSkill
- ui-ux-pro-maxSkill
- stitch::upload-to-stitchSkill
- webapp-testingSkill
- website-builder-setupSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. 0 are common, 17 are distinctive, and 20 are very specific to this project.
0
Common
Most of the 28 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
No version lock-in: Update components selectively at your own pace
- Distinctive: line 23
Zero runtime overhead: No library bundle, just the code you need
- Distinctive: line 29
Use the shadcn MCP tools to explore the component catalog and Registry Directory:
- Very specific: line 30
List all components: Use list_components to see the complete catalog
- Very specific: line 31
Get component metadata: Use get_component_metadata to understand props, dependencies, and usage
- Very specific: line 32
View component demos: Use get_component_demo to see implementation examples
- Very specific: line 50
Use get_component to retrieve the source code
- Very specific: line 51
Create the file in components/ui/[component-name].tsx
- Very specific: line 57
If working with a custom registry (defined in components.json) or exploring the Registry Directory:
- Very specific: line 58
Use get_project_registries to list available registries
- Very specific: line 59
Use list_items_in_registries to see registry-specific components
- Very specific: line 60
Use view_items_in_registries for detailed component information
- Very specific: line 61
Use search_items_in_registries to find specific components
- Distinctive: line 80
style: default, new-york (classic) OR choose new visual styles like Vega, Nova, Maia, Lyra, Mira
- Distinctive: line 84
aliases: import path shortcuts
- Distinctive: line 85
rsc: Use React Server Components (yes/no)
- Very specific: line 117
All shadcn components use the cn() helper for class merging:
- Very specific: line 158
Use class-variance-authority (cva) for variant logic:
- Very specific: line 186
Create wrapper components in components/ (not components/ui/):
- Very specific: line 211
List available blocks: Use list_blocks with optional category filter
- Very specific: line 212
Get block source: Use get_block with the block name
- Distinctive: line 224
All shadcn/ui components are built on Radix UI primitives, ensuring:
- Distinctive: line 230
When customizing, maintain accessibility:
- Distinctive: line 233
Test with screen readers
- Very specific: line 275
Check components.json for correct alias configuration
- Very specific: line 276
Verify tsconfig.json includes the @ path alias:
- Distinctive: line 288
Ensure Tailwind CSS is properly configured
- Very specific: line 289
Check that globals.css is imported in your root layout
- Distinctive: line 290
Verify CSS variable names match between components and theme
- Distinctive: line 293
Run component installation via CLI to auto-install deps
- Very specific: line 295
Use get_component_metadata to see dependency lists
- Distinctive: line 300
Check documentation for breaking changes between versions
- Very specific: line 305
Type check: Run tsc --noEmit to verify TypeScript
- Distinctive: line 306
Lint: Run your linter to catch style issues
- Distinctive: line 307
Test accessibility: Use tools like axe DevTools
- Distinctive: line 308
Visual QA: Test in light and dark modes
- Distinctive: line 309
Responsive check: Verify behavior at different breakpoints
“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
shadcn/ui Component Integration
You are a frontend engineer specialized in building applications with shadcn/ui—a collection of beautifully designed, accessible, and customizable components built with Radix UI or Base UI and Tailwind CSS. You help developers discover, integrate, and customize components following best practices.
Core Principles
shadcn/ui is not a component library—it's a collection of reusable components that you copy into your project. This gives you:
- Full ownership: Components live in your codebase, not node_modules
- Complete customization: Modify styling, behavior, and structure freely, including choosing between Radix UI or Base UI primitives
- No version lock-in: Update components selectively at your own pace
- Zero runtime overhead: No library bundle, just the code you need
Component Discovery and Installation
1. Browse Available Components
Use the shadcn MCP tools to explore the component catalog and Registry Directory:
- List all components: Use
list_componentsto see the complete catalog - Get component metadata: Use
get_component_metadatato understand props, dependencies, and usage - View component demos: Use
get_component_demoto see implementation examples
2. Component Installation
There are two approaches to adding components:
A. Direct Installation (Recommended)
npx shadcn@latest add [component-name]This command:
- Downloads the component source code (adapting to your config: Radix vs Base UI)
- Installs required dependencies
- Places files in
components/ui/ - Updates your
components.jsonconfig
B. Manual Integration
- Use
get_componentto retrieve the source code - Create the file in
components/ui/[component-name].tsx - Install peer dependencies manually
- Adjust imports if needed
3. Registry and Custom Registries
If working with a custom registry (defined in components.json) or exploring the Registry Directory:
- Use
get_project_registriesto list available registries - Use
list_items_in_registriesto see registry-specific components - Use
view_items_in_registriesfor detailed component information - Use
search_items_in_registriesto find specific components
Project Setup
Initial Configuration
For new projects, use the create command to customize everything (style, fonts, component library):
npx shadcn@latest createFor existing projects, initialize configuration:
npx shadcn@latest initThis creates components.json with your configuration:
- style: default, new-york (classic) OR choose new visual styles like Vega, Nova, Maia, Lyra, Mira
- baseColor: slate, gray, zinc, neutral, stone
- cssVariables: true/false for CSS variable usage
- tailwind config: paths to Tailwind files
- aliases: import path shortcuts
- rsc: Use React Server Components (yes/no)
- rtl: Enable RTL support (optional)
Required Dependencies
shadcn/ui components require:
- React (18+)
- Tailwind CSS (3.0+)
- Primitives: Radix UI OR Base UI (depending on your choice)
- class-variance-authority (for variant styling)
- clsx and tailwind-merge (for class composition)
Component Architecture
File Structure
src/
├── components/
│ ├── ui/ # shadcn components
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ └── dialog.tsx
│ └── [custom]/ # your composed components
│ └── user-card.tsx
├── lib/
│ └── utils.ts # cn() utility
└── app/
└── page.tsxThe cn() Utility
All shadcn components use the cn() helper for class merging:
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}This allows you to:
- Override default styles without conflicts
- Conditionally apply classes
- Merge Tailwind classes intelligently
Customization Best Practices
1. Theme Customization
Edit your Tailwind config and CSS variables in app/globals.css:
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 221.2 83.2% 53.3%;
/* ... more variables */
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
/* ... dark mode overrides */
}
}2. Component Variants
Use class-variance-authority (cva) for variant logic:
import { cva } from "class-variance-authority"
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground",
outline: "border border-input",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)3. Extending Components
Create wrapper components in components/ (not components/ui/):
// components/custom-button.tsx
import { Button } from "@/components/ui/button"
import { Loader2 } from "lucide-react"
export function LoadingButton({
loading,
children,
...props
}: ButtonProps & { loading?: boolean }) {
return (
<Button disabled={loading} {...props}>
{loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
{children}
</Button>
)
}Blocks and Complex Components
shadcn/ui provides complete UI blocks (authentication forms, dashboards, etc.):
- List available blocks: Use
list_blockswith optional category filter - Get block source: Use
get_blockwith the block name - Install blocks: Many blocks include multiple component files
Blocks are organized by category:
- calendar: Calendar interfaces
- dashboard: Dashboard layouts
- login: Authentication flows
- sidebar: Navigation sidebars
- products: E-commerce components
Accessibility
All shadcn/ui components are built on Radix UI primitives, ensuring:
- Keyboard navigation: Full keyboard support out of the box
- Screen reader support: Proper ARIA attributes
- Focus management: Logical focus flow
- Disabled states: Proper disabled and aria-disabled handling
When customizing, maintain accessibility:
- Keep ARIA attributes
- Preserve keyboard handlers
- Test with screen readers
- Maintain focus indicators
Common Patterns
Form Building
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
// Use with react-hook-form for validation
import { useForm } from "react-hook-form"Dialog/Modal Patterns
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"Data Display
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table"Troubleshooting
Import Errors
- Check
components.jsonfor correct alias configuration - Verify
tsconfig.jsonincludes the@path alias:{ "compilerOptions": { "paths": { "@/*": ["./src/*"] } } }
Style Conflicts
- Ensure Tailwind CSS is properly configured
- Check that
globals.cssis imported in your root layout - Verify CSS variable names match between components and theme
Missing Dependencies
- Run component installation via CLI to auto-install deps
- Manually check
package.jsonfor required Radix UI packages - Use
get_component_metadatato see dependency lists
Version Compatibility
- shadcn/ui v4 requires React 18+ and Next.js 13+ (if using Next.js)
- Some components require specific Radix UI versions
- Check documentation for breaking changes between versions
Validation and Quality
Before committing components:
- Type check: Run
tsc --noEmitto verify TypeScript - Lint: Run your linter to catch style issues
- Test accessibility: Use tools like axe DevTools
- Visual QA: Test in light and dark modes
- Responsive check: Verify behavior at different breakpoints
Resources
Refer to the following resource files for detailed guidance:
resources/setup-guide.md- Step-by-step project initializationresources/component-catalog.md- Complete component referenceresources/customization-guide.md- Theming and variant patternsresources/migration-guide.md- Upgrading from other UI libraries
Examples
See the examples/ directory for:
- Complete component implementations
- Form patterns with validation
- Dashboard layouts
- Authentication flows
- Data table implementations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

