---
name: ulk-shadcn
description: "Add and manage shadcn/ui v4 components using the shadcn CLI. Use when adding UI components, initializing shadcn, or checking for component updates."
---

# shadcn/ui CLI v4

## Prerequisite
Requires a React/Next.js project initialized.
No global install needed — uses `npx`.

## Initialize
```bash
npx shadcn@latest init                    # Initialize shadcn in project
```

## Add Components
```bash
npx shadcn@latest add button              # Add single component
npx shadcn@latest add button dialog card  # Add multiple components
npx shadcn@latest add --all               # Add all components
```

### Batch Patterns
```bash
# Form components
npx shadcn@latest add form input label select textarea checkbox radio-group switch

# Layout components
npx shadcn@latest add card sheet dialog drawer tabs accordion

# Data display
npx shadcn@latest add table badge avatar tooltip popover

# Navigation
npx shadcn@latest add navigation-menu breadcrumb pagination command
```

## Check Updates
```bash
npx shadcn@latest diff                    # Show diff of local vs registry
```
