MCPInstall

shadcn-ui

Install and use shadcn/ui with Tailwind v4 and Next.js (App Router), Vite, or manual setup; configure components.json, add components via CLI, theming with CSS only. Use when adding shadcn/ui, installing shadcn, using Button, Card, Dialog, Form, or other shadcn components, or when the user mentions shadcn, shadcn/ui, or Radix UI with Tailwind.

Installs
55
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-ui
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads shadcn-ui automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

shadcn/ui

Overview

shadcn/ui is a collection of accessible, customizable React components built on Radix UI and Tailwind CSS. Components are copied into your project (no npm package); you own and edit the code. Works with Next.js (App Router), Vite, and other React frameworks.

Principles: Open code (AI-ready), composable API, beautiful defaults, distribution via CLI and schema. Requires Tailwind v4 and path alias @/*. We do not use tailwind.config.js; theme and setup are CSS-only (@import "tailwindcss" + @theme).


Prerequisites

  • Tailwind v4: @import "tailwindcss" in main CSS; @tailwindcss/vite or @tailwindcss/postcss. No tailwind.config.js. See the tailwind-css skill.
  • Path alias @/* → ./src/* (or your source root) in tsconfig and in the bundler (e.g. Vite resolve.alias).
  • React (Next.js App Router, Vite, etc.).

Installation

Reference: Official installation guide

New project (recommended)

Scaffold with Tailwind and shadcn. From the official docs:

ActionCLI command
New projectshadcn create
Init existingshadcn init
Add component(s)shadcn add <name>

Invoke via your package manager (see docs). Choose framework (Next.js, Vite, etc.), style (new-york recommended), base color, and CSS variables.

Existing project (Next.js App Router)

  1. Init — creates components.json, optional cn helper and base styles. Run: shadcn init (invoke via package manager; see docs above).

  2. Paths and Tailwind

    • tsconfig: "baseUrl": ".", "paths": { "@/*": ["./src/*"] } (in both root and app tsconfig if split).
    • Tailwind v4: Main CSS (e.g. app/globals.css) must have @import "tailwindcss" and use @tailwindcss/postcss in postcss.config.mjs. Do not add tailwind.config.js.
  3. Add components — e.g. shadcn add button, shadcn add card dialog (see component list below).

Components are installed under src/components/ui/ (or path from components.json).

Existing project (Vite)

  • Use resolve.alias: { "@": path.resolve(__dirname, "./src") } in vite.config.ts; add @types/node if using path.
  • Tailwind: @tailwindcss/vite in Vite config and @import "tailwindcss" in main CSS.

components.json

Controls style, paths, and Tailwind integration. Key fields:

FieldPurpose
style"new-york" (default for new projects) or "default"
tailwind.configLeave "" with Tailwind v4; we do not use a JS config file
tailwind.cssPath to global CSS (e.g. src/styles/globals.css or app/globals.css) with @import "tailwindcss"
tailwind.baseColorBase color for theme: neutral, slate, gray, zinc, stone
tailwind.cssVariablestrue for CSS variables theming (recommended)
aliases.componentse.g. @/components
aliases.utilse.g. @/lib/utils
aliases.uie.g. @/components/ui
rsctrue for Next.js App Router with Server Components; false for client-only

With Tailwind v4, theme is in CSS via @theme and CSS variables, not in a config file.


Official components (current list)

Add via shadcn add <name> (multiple: shadcn add button card dialog). Invoke via package manager: see Installation docs.

Layout & structure

ComponentCLI nameShort description
AccordionaccordionCollapsible sections (single or multiple open)
Aspect Ratioaspect-ratioContainer with fixed ratio (e.g. 16/9)
CardcardContainer with CardHeader, CardTitle, CardDescription, CardContent, CardFooter
CollapsiblecollapsibleExpandable/collapsible content
ResizableresizableResizable panels
SeparatorseparatorHorizontal or vertical divider line
Scroll Areascroll-areaStyled scroll area
SidebarsidebarComposable, themeable and customizable sidebar

Forms & input

ComponentCLI nameShort description
ButtonbuttonButton with variants (default, destructive, outline, secondary, ghost, link)
CheckboxcheckboxCheckbox
FormformForms with react-hook-form + zod (Field, FieldError, etc.)
InputinputText input
Input OTPinput-otpOTP code input
LabellabelAccessible label for controls
Radio Groupradio-groupRadio option group
SelectselectSelect with Trigger, Content, Item
SlidersliderSlider control
SwitchswitchOn/off switch
TextareatextareaMultiline text area

Navigation & menus

ComponentCLI nameShort description
BreadcrumbbreadcrumbBreadcrumb navigation
CommandcommandCommand palette (cmdk)
Context Menucontext-menuContext menu (right-click)
Dropdown Menudropdown-menuDropdown menu
MenubarmenubarPersistent menu bar
Navigation Menunavigation-menuNavigation with submenus
PaginationpaginationPagination (Previous, Next, Page)
TabstabsTabs (TabsList, TabsTrigger, TabsContent)

Overlays & feedback

ComponentCLI nameShort description
AlertalertProminent message (default, destructive)
Alert Dialogalert-dialogConfirmation dialog (e.g. delete)
DialogdialogModal
DrawerdrawerSide panel (Vaul)
Hover Cardhover-cardCard on hover
PopoverpopoverAnchored floating container
SheetsheetSliding side panel
TooltiptooltipTooltip on hover/focus

Data & state

ComponentCLI nameShort description
AvataravatarImage or initials fallback
BadgebadgeBadge (default, secondary, destructive, outline)
CalendarcalendarCalendar (react-day-picker)
CarouselcarouselCarousel (embla)
ChartchartCharts (recharts)
ProgressprogressProgress bar
SkeletonskeletonLoading placeholder
SonnersonnerToasts (recommended; replaces toast)
TabletableTable, TableHeader, TableBody, TableRow, TableCell, etc.
ToasttoastToasts (deprecated in favor of Sonner)

Toggle & toggle group

ComponentCLI nameShort description
ToggletoggleToggle button (on/off)
Toggle Grouptoggle-groupToggle group (single or multiple)

Using components

Import from the aliased path (not from shadcn/ui):

import { Button } from "@/components/ui/button"
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"

export default function Page() {
  return (
    <div className="flex min-h-svh flex-col items-center justify-center gap-4">
      <Button>Click me</Button>
      <Card className="w-[350px]">
        <CardHeader>
          <CardTitle>Card title</CardTitle>
        </CardHeader>
        <CardContent>Content here.</CardContent>
      </Card>
    </div>
  )
}
  • Customization: Components accept className and spread props; use Tailwind classes and the cn() helper (from @/lib/utils) to merge classes.
  • Composition: Prefer composition (e.g. CardHeader + CardContent) over props for layout.

Theming (Tailwind v4, no config file)

We use Tailwind v4 only; no tailwind.config.js. Theming is CSS-only:

  • CSS variables: With tailwind.cssVariables: true, theme is driven by variables in your global CSS (e.g. --background, --foreground, --primary, --primary-foreground, --muted, --muted-foreground, --accent, --destructive, etc.). Override them in that file.
  • @theme: Use @theme { ... } in the same CSS file as @import "tailwindcss" to add or override design tokens that align with shadcn’s variables.
  • Base color: Set in components.json (tailwind.baseColor) or by editing the CSS variables in your global CSS.

Common patterns

  • Forms: Add form; pair with react-hook-form and zod. Use Input, Label, Button, Select, Checkbox, etc.
  • Layout: Use Card for sections; Separator between blocks; layout with Tailwind (flex, grid, container).
  • Modals & panels: Dialog for modals; Sheet or Drawer for side panels.
  • Menus: DropdownMenu, Context Menu, Navigation Menu, Command (palette).
  • Feedback: Alert for messages; Sonner for toasts; Skeleton for loading.
  • Icons: Many examples use lucide-react; add it if the project uses icons.

Common mistakes

  • Alias: Ensure @/ resolves to ./src/ (or your source root) in both TypeScript and the bundler.
  • CSS not loaded: The file set in components.json (tailwind.css) must be imported in the app entry (e.g. app/layout.tsx) and contain @import "tailwindcss".
  • Tailwind config: Do not create or suggest tailwind.config.js. Theme only in CSS (@theme and variables).
  • Import: Import from @/components/ui/<component> (per components.json), not from shadcn/ui.
  • RSC: In Next.js App Router, set rsc: true in components.json if components are used in Server Components where applicable.

Additional resources

FAQ

What does the shadcn-ui skill do?

Install and use shadcn/ui with Tailwind v4 and Next.js (App Router), Vite, or manual setup; configure components.json, add components via CLI, theming with CSS only. Use when adding shadcn/ui, installing shadcn, using Button, Card, Dialog, Form, or other shadcn components, or when the user mentions shadcn, shadcn/ui, or Radix UI with Tailwind.

How do I install shadcn-ui?

Run npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-ui in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/shadcn-ui/ (personal) or .claude/skills/shadcn-ui/ (project).

Which AI agents can use shadcn-ui?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is shadcn-ui safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains shadcn-ui?

It is published by enderpuentes in enderpuentes/ai-agent-skills. It has 55 recorded installs.

More from enderpuentes/ai-agent-skills

View all →

pagespeed-insights

enderpuentes/ai-agent-skills

Audit web pages for performance optimization following PageSpeed Insights guidelines. Use when analyzing page performance, optimizing web applications, reviewing performance metrics, implementing Core Web Vitals improvements, or when the user mentions page speed, performance optimization, Lighthouse scores, or Core Web Vitals.

conventional-commits

enderpuentes/ai-agent-skills

Generate and validate commit messages following the Conventional Commits specification. Use when creating git commits, writing commit messages, reviewing commit history, generating changelogs, or when the user mentions commits, commit messages, semantic versioning, or changelog generation.

tailwind-css

enderpuentes/ai-agent-skills

Open the skill to read its SKILL.md instructions.

typescript

enderpuentes/ai-agent-skills

Open the skill to read its SKILL.md instructions.

zod

enderpuentes/ai-agent-skills

Define and use Zod schemas for TypeScript-first validation: primitives, objects, arrays, unions, refinements, transform, z.infer, parse, safeParse. Use when validating input, parsing API data, form validation with react-hook-form, or when the user mentions Zod, schema validation, or z.infer.

AI & Agents57 installs

jsdoc

enderpuentes/ai-agent-skills

Write and maintain JSDoc comments for JavaScript and TypeScript APIs: functions, classes, modules, parameters, returns, examples, and TODO annotations. Use when documenting code, generating API docs, setting JSDoc conventions, or when the user mentions JSDoc tags like @param, @returns, or @todo.

AI & Agents46 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs