Skip to content
Skills Library
Programming · Learning & explanation

shadcn

/shadcn

shadcn/ui knowledge base - installation, components, theming, MCP server integration. Use when building UI components, searching component registry, implementing accessible patterns, or customizing component styles.

Repository
Synapse ↗
Licence
AGPL-3.0
Last repository change
15.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 15.09.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What it does and when to use it

shadcn/ui knowledge base - installation, components, theming, MCP server integration. Use when building UI components, searching component registry, implementing accessible patterns, or customizing component styles.

Original author description

shadcn/ui knowledge base - installation, components, theming, MCP server integration. Use when building UI components, searching component registry, implementing accessible patterns, or customizing component styles.

How it works

  1. Installation
  2. Add Components
  3. MCP Server Integration
  4. Component Categories
  5. Theming with CSS Variables
  6. cn() Utility (Merge Classes Safely)
  7. Best Practices
Original SKILL.md headings · 113 lines, 322 words
SKILL.md preview
---
name: shadcn
description: shadcn/ui knowledge base - installation, components, theming, MCP server integration. Use when building UI components, searching component registry, implementing accessible patterns, or customizing component styles.
version: 1.0.0
---

# shadcn/ui Knowledge Base

## Installation

```bash
npx shadcn@latest init
```

Configuration prompts:
- Style: Default
- Base color: Slate
- CSS variables: Yes

## Add Components

```bash
# Single component
npx shadcn@latest add button

# Multiple components
npx shadcn@latest add button card dialog form input

# All components
npx shadcn@latest add --all
```

## MCP Server Integration

```json
// .mcp.json
{
  "mcpServers": {
    "shadcn": {
      "command": "npx",
      "args": ["shadcn@latest", "mcp"]
    }
  }
}
```

**MCP Commands:**
- "Add button, card, and dialog components"
- "Find a login form from shadcn registry"
- "Install all form components"

## Component Categories

### Forms
- Button, Input, Textarea, Select, Checkbox, Radio Group
- Switch, Slider, Toggle, Form (with react-hook-form)
- Label, Calendar, Date Picker

### Feedback
- Alert, Alert Dialog, Toast, Sonner
- Progress, Skeleton, Badge, Avatar

### Layout
- Card, Separator, Accordion, Collapsible
- Tabs, Sheet, Scroll Area, Resizable

### Navigation
- Navigation Menu, Menubar, Dropdown Menu
- Context Menu, Command, Breadcrumb, Pagination

### Overlay
- Dialog, Drawer, Popover, Tooltip, Hover Card

### Data Display
- Table, Data Table, Carousel, Aspect Ratio

## Theming with CSS Variables

shadcn/ui uses CSS variables for theming. Configure in `globals.css`:

```css
@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    /* ... other variables */
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    /* ... dark variants */
  }
}
```

## cn() Utility (Merge Classes Safely)

```typescript
// lib/utils.ts
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}
```

## Best Practices

1. **Copy, don't wrap** - Own your components, don't create wrappers
2. **Use cn()** - For conditional classes
3. **Extend variants** - With cva() for custom variants
4. **Accessibility** - Built on Radix primitives (ARIA compliant)
5. **Dark mode** - Use CSS variables for theme switching
Files in this package (4)
  • SKILL.md 2 KB
  • learnings.md 1 KB
  • evals/evals.json 2 KB
  • evals/trigger_evals.json 1 KB

Versions

RepositoryScoreLicence
This page · PIXARTSeu/Synapse100AGPL-3.0
shadcn/ui100MIT
kriegcloud/beep-effect100Apache-2.0
coollabsio/coolify100Apache-2.0
different-ai/openwork100MIT
miragon/pulse100MIT
seaworld008/commonly-used-high-value-skills100MIT
zenobi-us/dotfiles100MIT
itswendell/palot100MIT

Database snapshot: 13.11.2026 · package version 8b4f0dc2be12 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100od-shadcn-ui
    Build UI components with shadcn/ui Use when the user asks for shadcn ui work, or mentions od, shadcn, ui.
  • 100shadcn-ui
    Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind…
  • 100shadcn-ui
    Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind…
  • 100registry-component-patterns
    Register components in registry.json for shadcn/ui add command. Apply when adding new 8-bit components to the component library.
  • 91shadcn-ui
    Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind…
  • 100shadcn-integration
    Integration guide for shadcn/ui components with OKLCH design tokens. Use when setting up shadcn, customizing themes, or adding components to Next.js projects. Auto-trigger on /init --tokens --shadcn flag.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.