Get new AI skills and notes from Sujan by emailNew AI skills by emailAI skills by email

No Wind Days
← Back to the AI Skills Library

shadcn/ui

Adds, composes and themes components in React projects built on shadcn/ui, including applying a brand spec.

Skill fileIn testing

Design & UI

Download .md

How to use this

  1. Add the skill to your AI assistant. Copy it or download SKILL.md, then follow the how-to guide for Claude, ChatGPT, Grok or Cursor. Keep LICENSE.txt with it.
  2. Give it what it needs: A React project that uses shadcn/ui (it has a components.json), and the component or theme you need. Add a DESIGN.md or brand spec if you have one.
  3. Ask for the work. For example: Use the shadcn-ui skill. Add a settings page with a form and a data table, themed to our DESIGN.md.
  4. What you get back: Components added and composed the shadcn way, themed to your brand.

When to use it: Use when building or styling UI in a React project that uses shadcn/ui (has a components.json): adding, composing or theming components, or applying a DESIGN.md or brand spec to shadcn.

shadcn/ui (condensed)

Source: https://ui.shadcn.com/docs/skills (MIT). Official install: pnpm dlx skills add shadcn/ui.

Only relevant when a site is built in React with shadcn/ui; not for static HTML or image mockups.

Principles

  1. Use existing components first (npx shadcn@latest search).
  2. Compose, don't reinvent (settings = Tabs + Card + form controls; dashboard = Sidebar + Card + Chart + Table).
  3. Built-in variants before custom styles.
  4. Semantic colours (bg-primary, text-muted-foreground), never raw bg-blue-500.

Critical rules

  • className for layout, not for overriding component colours; flex + gap-* instead of space-x/y; cn() for conditional classes; no manual dark: overrides or z-index on overlays.
  • Forms: FieldGroup + Field; 2–7 options use ToggleGroup; validation via data-invalid and aria-invalid.
  • Dialog/Sheet/Drawer always need a Title; full Card composition; Avatar always has AvatarFallback.
  • Use components, not custom markup: Alert, Empty, Separator, Skeleton, Badge, sonner.
  • Icons: use the project's iconLibrary; never assume lucide.

Workflow

  1. npx shadcn@latest info --json for project context.
  2. Check installed components before add.
  3. Read npx shadcn@latest docs <component> before using it.
  4. add with --dry-run/--diff; never --overwrite without approval.
  5. Never guess a registry.

DESIGN.md to shadcn theme

Map the DESIGN.md tokens onto shadcn CSS variables (radius, shadows, fonts), restyle via cva variants, build a design-system page, and verify in a browser including dark mode.