summaryrefslogtreecommitdiff
path: root/ui/shadcn/.claude/commands/add-component.md
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-01-16 08:30:14 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-01-16 08:30:14 +0900
commit3fbb9a18372f2b6a675dd6c039ba52be76f3eeb4 (patch)
treeaa694a36cdd323a7853672ee7a2ba60409ac3b06 /ui/shadcn/.claude/commands/add-component.md
updates
Diffstat (limited to 'ui/shadcn/.claude/commands/add-component.md')
-rw-r--r--ui/shadcn/.claude/commands/add-component.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/ui/shadcn/.claude/commands/add-component.md b/ui/shadcn/.claude/commands/add-component.md
new file mode 100644
index 0000000..64652fd
--- /dev/null
+++ b/ui/shadcn/.claude/commands/add-component.md
@@ -0,0 +1,53 @@
+---
+description: Add shadcn/ui components to your project
+argument-hint: "[component-names...]"
+allowed-tools: Bash, Read, Write
+---
+
+Add one or more shadcn/ui components to your project.
+
+## Instructions
+
+1. Check if shadcn/ui is initialized in the project
+2. If not initialized, suggest running `npx shadcn@latest init` first
+3. For each component requested:
+ - Run `npx shadcn@latest add [component]`
+ - Verify component was added successfully
+ - Check for any peer dependencies
+4. If components have dependencies on each other, install in correct order
+5. Provide usage examples for the installed components
+
+## Component Dependencies
+
+Some components depend on others:
+- `form` requires `button`, `label`, `input`
+- `data-table` requires `table`, `button`, `dropdown-menu`, `input`
+- `date-picker` requires `button`, `calendar`, `popover`
+- `combobox` requires `command`, `popover`, `button`
+
+## Common Components
+
+**Layout**: card, separator, aspect-ratio, scroll-area
+**Forms**: input, label, button, select, checkbox, radio-group, switch, textarea, form
+**Overlays**: dialog, alert-dialog, sheet, popover, tooltip, hover-card
+**Navigation**: navigation-menu, tabs, breadcrumb, pagination
+**Data**: table, data-table, badge, avatar, progress
+**Feedback**: alert, toast, skeleton, sonner
+
+## Arguments
+
+- Component names separated by spaces: `button card dialog`
+- Or use `--all` to add all available components
+
+## Example
+
+If the user says: `/add-component form select date-picker`
+
+Execute:
+```bash
+npx shadcn@latest add form
+npx shadcn@latest add select
+npx shadcn@latest add date-picker
+```
+
+Then provide usage examples for each component added. \ No newline at end of file