Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jezweb avatar

Shadcn Ui

  • 3.3k installs
  • 946 repo stars
  • Updated July 2, 2026
  • jezweb/claude-skills

How to install, configure, customize, and combine shadcn/ui components in a React project with an established theme.

About

This skill installs and configures shadcn/ui components into React projects after theme infrastructure is established via tailwind-theme-builder. It provides dependency-ordered installation sequences for foundation components (button, input, card) and feature components (forms, tables, dialogs, navigation). Guides customization through semantic CSS tokens, documents known gotchas (Radix Select empty strings, React Hook Form null handling, Lucide tree-shaking, Dialog width overrides), and assembles components into working recipes including contact forms, data tables, modal CRUD interfaces, and settings pages. Prerequisites include CSS variables, components.json, and cn() utility setup.

  • Dependency-ordered installation: foundation first, then feature components
  • Known gotchas documented: Radix Select values, React Hook Form spreading, Lucide dynamic imports, Dialog width breakpoin
  • Component recipes for forms, data tables, CRUD modals, and navigation
  • Customization via semantic tokens and variant extension in component files
  • External dependencies tracked: react-hook-form, zod, sonner, @tanstack/react-table, cmdk

Shadcn Ui by the numbers

  • 3,260 all-time installs (skills.sh)
  • +36 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #149 of 2,244 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jezweb/claude-skills --skill shadcn-ui

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.3k
repo stars946
Security audit3 / 3 scanners passed
Last updatedJuly 2, 2026
Repositoryjezweb/claude-skills

What it does

Install and customize shadcn/ui components in themed React projects with forms, data tables, and navigation patterns.

Who is it for?

React projects with established Tailwind theme infrastructure; developers building forms, data tables, admin interfaces, or navigation systems.

Skip if: Projects without theme setup; non-React frameworks; static HTML; projects avoiding component libraries.

When should I use this skill?

Adding UI components after tailwind-theme-builder setup; building forms with validation; creating data tables; implementing navigation; setting up modal dialogs.

What you get

Developer can install shadcn components in correct order, avoid documented gotchas, customize with semantic tokens, and assemble components into complete working UI patterns.

  • component install commands
  • tsx snippets
  • variant and size reference

By the numbers

  • Covers ~15 most-used shadcn/ui components
  • Button documents 6 variants and 4 sizes

Files

SKILL.mdMarkdownGitHub ↗

shadcn/ui Components

Add shadcn/ui components to a themed React project. This skill runs AFTER tailwind-theme-builder has set up CSS variables, ThemeProvider, and dark mode. It handles component installation, customisation, and combining components into working patterns.

Prerequisite: Theme infrastructure must exist (CSS variables, components.json, cn() utility). Use tailwind-theme-builder first if not set up.

Installation Order

Install components in dependency order. Foundation components first, then feature components:

Foundation (install first)

pnpm dlx shadcn@latest add button
pnpm dlx shadcn@latest add input label
pnpm dlx shadcn@latest add card

Feature Components (install as needed)

# Forms
pnpm dlx shadcn@latest add form        # needs: react-hook-form, zod, @hookform/resolvers
pnpm dlx shadcn@latest add textarea select checkbox switch

# Feedback
pnpm dlx shadcn@latest add toast        # needs: sonner
pnpm dlx shadcn@latest add alert badge

# Overlay
pnpm dlx shadcn@latest add dialog sheet popover dropdown-menu

# Data Display
pnpm dlx shadcn@latest add table        # for data tables, also: @tanstack/react-table
pnpm dlx shadcn@latest add tabs separator avatar

# Navigation
pnpm dlx shadcn@latest add navigation-menu command

External Dependencies

ComponentRequires
Formreact-hook-form, zod, @hookform/resolvers
Toastsonner
Data Table@tanstack/react-table
Commandcmdk
Date Pickerdate-fns (optional)

Install external deps separately: pnpm add react-hook-form zod @hookform/resolvers

Known Gotchas

These are documented corrections that prevent common bugs:

Radix Select — No Empty Strings

// Don't use empty string values
<SelectItem value="">All</SelectItem>           // BREAKS

// Use sentinel value
<SelectItem value="__any__">All</SelectItem>    // WORKS
const actual = value === "__any__" ? "" : value

React Hook Form — Null Values

// Don't spread {...field} — it passes null which Input rejects
<Input
  value={field.value ?? ''}
  onChange={field.onChange}
  onBlur={field.onBlur}
  name={field.name}
  ref={field.ref}
/>

Lucide Icons — Tree-Shaking

// Don't use dynamic import — icons get tree-shaken in production
import * as LucideIcons from 'lucide-react'
const Icon = LucideIcons[iconName]  // BREAKS in prod

// Use explicit map
import { Home, Users, Settings, type LucideIcon } from 'lucide-react'
const ICON_MAP: Record<string, LucideIcon> = { Home, Users, Settings }
const Icon = ICON_MAP[iconName]

Dialog Width Override

// Default sm:max-w-lg won't be overridden by max-w-6xl
<DialogContent className="max-w-6xl">       // DOESN'T WORK

// Use same breakpoint prefix
<DialogContent className="sm:max-w-6xl">    // WORKS

Customising Components

shadcn components use semantic CSS tokens from your theme. To customise:

Variant extension

Add custom variants by editing the component file in src/components/ui/:

// button.tsx — add a "brand" variant
const buttonVariants = cva("...", {
  variants: {
    variant: {
      default: "bg-primary text-primary-foreground",
      brand: "bg-brand text-brand-foreground hover:bg-brand/90",
      // ... existing variants
    },
  },
})

Colour overrides

Use semantic tokens from your theme — never raw Tailwind colours:

// Don't use raw colours
<Button className="bg-blue-500">             // WRONG

// Use semantic tokens
<Button className="bg-primary">              // RIGHT
<Card className="bg-card text-card-foreground">  // RIGHT

Workflow

Step 1: Assess Needs

Determine what UI patterns the project needs:

NeedComponents
Forms with validationForm, Input, Label, Select, Textarea, Button, Toast
Data display with sortingTable, Badge, Pagination
Admin CRUD interfaceDialog, Form, Table, Button, Toast
Marketing/landing pageCard, Button, Badge, Separator
Settings/preferencesTabs, Form, Switch, Select, Toast
NavigationNavigationMenu (desktop), Sheet (mobile), ModeToggle

Step 2: Install Components

Install foundation first, then feature components for the identified needs. Use the commands above.

Step 3: Build Recipes

Combine components into working patterns. See references/recipes.md for complete working examples:

  • Contact Form — Form + Input + Textarea + Button + Toast
  • Data Table — Table + Column sorting + Pagination + Search
  • Modal CRUD — Dialog + Form + Button
  • Navigation — Sheet + NavigationMenu + ModeToggle
  • Settings Page — Tabs + Form + Switch + Select + Toast

Step 4: Customise

Apply project-specific colours and variants using semantic tokens from the theme.

Reference Files

WhenRead
Choosing components, install commands, propsreferences/component-catalogue.md
Building complete UI patternsreferences/recipes.md

Related skills

How it compares

Use shadcn-ui for fast in-editor recall of top components; open official shadcn/ui docs when you need rare primitives or theming deep dives.

FAQ

How many shadcn/ui components does shadcn-ui cover?

shadcn-ui documents roughly 15 of the most-used shadcn/ui components with install commands and examples. The full shadcn/ui library is larger; see ui.shadcn.com for components outside this catalogue.

Which package manager does shadcn-ui use for installs?

shadcn-ui examples use pnpm dlx shadcn@latest add followed by the component name, such as button or input label pairs, matching the official shadcn CLI workflow.

Is Shadcn Ui safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Frontend Developmentfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.