
Shadcn Ui
- 46 installs
- Updated June 23, 2026
- enderpuentes/ai-agent-skills
Helps with ai & agent building tasks.
About
shadcn-ui is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- shadcn-ui
- AI & Agent Building
- AI-coding skill
Shadcn Ui by the numbers
- 46 all-time installs (skills.sh)
- Ranked #7,629 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Jul 24, 2026 (Skillselion catalog sync)
npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-uiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 46 |
|---|---|
| Last updated | June 23, 2026 |
| Repository | enderpuentes/ai-agent-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
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/viteor@tailwindcss/postcss. Notailwind.config.js. See the tailwind-css skill. - Path alias
@/*→./src/*(or your source root) intsconfigand in the bundler (e.g. Viteresolve.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:
| Action | CLI command |
|---|---|
| New project | shadcn create |
| Init existing | shadcn 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/postcssinpostcss.config.mjs. Do not addtailwind.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") }invite.config.ts; add@types/nodeif usingpath. - Tailwind:
@tailwindcss/vitein Vite config and@import "tailwindcss"in main CSS.
---
components.json
Controls style, paths, and Tailwind integration. Key fields:
| Field | Purpose |
|---|---|
style | "new-york" (default for new projects) or "default" |
tailwind.config | Leave "" with Tailwind v4; we do not use a JS config file |
tailwind.css | Path to global CSS (e.g. src/styles/globals.css or app/globals.css) with @import "tailwindcss" |
tailwind.baseColor | Base color for theme: neutral, slate, gray, zinc, stone |
tailwind.cssVariables | true for CSS variables theming (recommended) |
aliases.components | e.g. @/components |
aliases.utils | e.g. @/lib/utils |
aliases.ui | e.g. @/components/ui |
rsc | true 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
| Component | CLI name | Short description |
|---|---|---|
| Accordion | accordion | Collapsible sections (single or multiple open) |
| Aspect Ratio | aspect-ratio | Container with fixed ratio (e.g. 16/9) |
| Card | card | Container with CardHeader, CardTitle, CardDescription, CardContent, CardFooter |
| Collapsible | collapsible | Expandable/collapsible content |
| Resizable | resizable | Resizable panels |
| Separator | separator | Horizontal or vertical divider line |
| Scroll Area | scroll-area | Styled scroll area |
| Sidebar | sidebar | Composable, themeable and customizable sidebar |
Forms & input
| Component | CLI name | Short description |
|---|---|---|
| Button | button | Button with variants (default, destructive, outline, secondary, ghost, link) |
| Checkbox | checkbox | Checkbox |
| Form | form | Forms with react-hook-form + zod (Field, FieldError, etc.) |
| Input | input | Text input |
| Input OTP | input-otp | OTP code input |
| Label | label | Accessible label for controls |
| Radio Group | radio-group | Radio option group |
| Select | select | Select with Trigger, Content, Item |
| Slider | slider | Slider control |
| Switch | switch | On/off switch |
| Textarea | textarea | Multiline text area |
Navigation & menus
| Component | CLI name | Short description |
|---|---|---|
| Breadcrumb | breadcrumb | Breadcrumb navigation |
| Command | command | Command palette (cmdk) |
| Context Menu | context-menu | Context menu (right-click) |
| Dropdown Menu | dropdown-menu | Dropdown menu |
| Menubar | menubar | Persistent menu bar |
| Navigation Menu | navigation-menu | Navigation with submenus |
| Pagination | pagination | Pagination (Previous, Next, Page) |
| Tabs | tabs | Tabs (TabsList, TabsTrigger, TabsContent) |
Overlays & feedback
| Component | CLI name | Short description |
|---|---|---|
| Alert | alert | Prominent message (default, destructive) |
| Alert Dialog | alert-dialog | Confirmation dialog (e.g. delete) |
| Dialog | dialog | Modal |
| Drawer | drawer | Side panel (Vaul) |
| Hover Card | hover-card | Card on hover |
| Popover | popover | Anchored floating container |
| Sheet | sheet | Sliding side panel |
| Tooltip | tooltip | Tooltip on hover/focus |
Data & state
| Component | CLI name | Short description |
|---|---|---|
| Avatar | avatar | Image or initials fallback |
| Badge | badge | Badge (default, secondary, destructive, outline) |
| Calendar | calendar | Calendar (react-day-picker) |
| Carousel | carousel | Carousel (embla) |
| Chart | chart | Charts (recharts) |
| Progress | progress | Progress bar |
| Skeleton | skeleton | Loading placeholder |
| Sonner | sonner | Toasts (recommended; replaces toast) |
| Table | table | Table, TableHeader, TableBody, TableRow, TableCell, etc. |
| Toast | toast | Toasts (deprecated in favor of Sonner) |
Toggle & toggle group
| Component | CLI name | Short description |
|---|---|---|
| Toggle | toggle | Toggle button (on/off) |
| Toggle Group | toggle-group | Toggle 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
classNameand 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 withreact-hook-formandzod. UseInput,Label,Button,Select,Checkbox, etc. - Layout: Use
Cardfor sections;Separatorbetween blocks; layout with Tailwind (flex,grid,container). - Modals & panels:
Dialogfor modals;SheetorDrawerfor side panels. - Menus:
DropdownMenu,Context Menu,Navigation Menu,Command(palette). - Feedback:
Alertfor messages;Sonnerfor toasts;Skeletonfor 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 (@themeand variables). - Import: Import from
@/components/ui/<component>(percomponents.json), not fromshadcn/ui. - RSC: In Next.js App Router, set
rsc: trueincomponents.jsonif components are used in Server Components where applicable.
---
Additional resources
- reference.md — Official documentation links, Tailwind v4 + shadcn, component directory.
- Official docs: https://ui.shadcn.com/docs
- Components: https://ui.shadcn.com/docs/components
- Directory (community): https://ui.shadcn.com/docs/directory
License
Skill License - Free Use
This skill (the documentation, structure, and implementation) was created by Ender Puentes <Endev/> and is provided for free and open use. You are free to:
- Use this skill in any project, personal or commercial
- Modify the skill to fit your needs
- Distribute the skill to others
- Share modified versions of the skill
- Include this skill in your own skill collections
No restrictions apply – this skill is available for unrestricted use. Attribution is appreciated but not required.
Note: This skill documents and references shadcn/ui; the skill itself is an independent work. shadcn/ui and Radix UI have their own licenses.
shadcn/ui — Reference & Official Documentation
This file complements the shadcn-ui skill with official documentation links and extra context for indexing.
Official documentation (indexable)
- Introduction: https://ui.shadcn.com/docs
- Installation: https://ui.shadcn.com/docs/installation
- Create new project: https://ui.shadcn.com/create
- Components (overview): https://ui.shadcn.com/docs/components
- Directory (community components): https://ui.shadcn.com/docs/directory
- Tailwind v4: https://ui.shadcn.com/docs/tailwind-v4
- Dark mode: https://ui.shadcn.com/docs/dark-mode
- Theming: See “Theming” in main docs and
components.jsontailwind.baseColor/ CSS variables.
Framework-specific installation
- Next.js: CLI
shadcn createorshadcn init; select Next.js. App Router supported; setrsc: trueincomponents.jsonfor Server Components. Invocation: see Installation docs. - Vite: https://ui.shadcn.com/docs/installation/vite — Tailwind via
@tailwindcss/vite, path alias@/*, thenshadcn init. - Manual: https://ui.shadcn.com/docs/installation/manual — Add Tailwind, path aliases,
cnhelper, and createcomponents.jsonby hand if needed.
Tailwind v4 + shadcn
- We use Tailwind v4 only; no
tailwind.config.js. - In
components.json, leavetailwind.configas"". - Global styles: one CSS file with
@import "tailwindcss"and, if needed,@theme { ... }for design tokens. - shadcn theming is done with CSS variables in that same global CSS file (e.g.
--background,--foreground,--primary). These work with Tailwind v4’s@themeif you map or override tokens there.
Component list (CLI names for shadcn add)
CLI: shadcn add <name>. Invocation details in Installation docs.
Layout & structure: accordion, aspect-ratio, card, collapsible, resizable, separator, scroll-area, sidebar
Forms & input: button, checkbox, form, input, input-otp, label, radio-group, select, slider, switch, textarea
Navigation & menus: breadcrumb, command, context-menu, dropdown-menu, menubar, navigation-menu, pagination, tabs
Overlays & feedback: alert, alert-dialog, dialog, drawer, hover-card, popover, sheet, tooltip
Data & state: avatar, badge, calendar, carousel, chart, progress, skeleton, sonner, table, toast (deprecated; use sonner)
Toggle: toggle, toggle-group
Dependencies: Adding some components (e.g. calendar, carousel, chart, form) will install peer deps (react-day-picker, embla, recharts, react-hook-form, zod, etc.). Check CLI output.
components.json schema
- Schema URL: https://ui.shadcn.com/schema.json
- Key fields:
style,rsc,tailwind.config,tailwind.css,tailwind.baseColor,tailwind.cssVariables,aliases.components,aliases.utils,aliases.ui,aliases.lib,aliases.hooks,iconLibrary.
Primitives (Radix UI)
shadcn/ui components are built on Radix UI primitives. For low-level behavior or accessibility details, see:
- Radix UI: https://www.radix-ui.com/primitives
Icons
- Lucide (default in many examples): https://lucide.dev
- Configure in
components.jsonwithiconLibrary(e.g.lucide).
Related skills
- tailwind-css: Tailwind v4 setup,
@theme,@import "tailwindcss", Next.js PostCSS, no config file. Use when configuring Tailwind or theming.