スキル一覧に戻る
iamhenry

shadcn

by iamhenry

3🍴 3📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: shadcn description: Add and manage shadcn/ui components via CLI. Use when installing new UI components, building forms with validation, creating modals/dialogs/sheets, adding navigation menus, setting up data tables or charts, or updating existing shadcn components.

shadcn/ui CLI

Quickly add pre-built, customizable React components based on Radix UI and Tailwind CSS.

Quick Reference

CommandPurpose
npx shadcn@latest add <component>Add single component
npx shadcn@latest add btn dialogAdd multiple components at once
npx shadcn@latest add -aAdd ALL components
npx shadcn@latest add -o <component>Overwrite existing component
npx shadcn@latest view <component>Preview component before install
npx shadcn@latest initInitialize project (first-time)

Common Component Groups

Forms: button, input, label, select, checkbox, radio-group, switch, textarea, form

Layout: card, separator, tabs, accordion, collapsible, resizable

Feedback: alert, alert-dialog, dialog, drawer, sheet, toast, sonner, tooltip, popover

Navigation: dropdown-menu, menubar, navigation-menu, breadcrumb, pagination, command

Data Display: table, data-table, avatar, badge, calendar, carousel, chart

Usage Patterns

Add a single component

npx shadcn@latest add button
npx shadcn@latest add form input label select

Skip confirmation prompts

npx shadcn@latest add -y dialog

Overwrite existing component (after shadcn update)

npx shadcn@latest add -o button

Preview before installing

npx shadcn@latest view chart

Custom install path

npx shadcn@latest add button -p src/components/ui

Key Flags

FlagShortDescription
--yes-ySkip confirmation prompt
--overwrite-oOverwrite existing files
--all-aInstall all components
--path <path>-pCustom destination path
--silent-sSuppress output

Project Notes

  • Components install to src/ui/ in this project (configured in components.json)
  • Uses @/ path alias for imports
  • Tailwind CSS + CVA (class-variance-authority) for variants
  • All components are fully customizable after installation

Troubleshooting

Component already exists: Use -o flag to overwrite

npx shadcn@latest add -o button

Missing dependencies: The CLI auto-installs peer deps, but if issues occur:

npm install @radix-ui/react-<primitive> class-variance-authority

Path issues: Check components.json for configured paths

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です