
Shadcn Ui
This is a comprehensive reference for building UI components with shadcn/ui, covering everything from CLI setup to advanced composition patterns. You'll find decision tables for when to use CVA variants versus compound components, working examples of the asChild pattern for polymorphic rendering, and modern CSS techniques like has() selectors and data-slot targeting. The gates checklist before running init or add commands is genuinely useful and will save you from configuration headaches. What stands out is the practical focus on component anatomy and prop typing patterns rather than just showcasing finished components. If you're building a design system or need to understand why shadcn components are structured the way they are, this gives you the underlying patterns to extend and customize them properly.
- skills.sh installs
- 356
- GitHub stars
- 87
- last updated
- Aug 21, 2026
Install
$ npx -y skills add existential-birds/beagle --skill shadcn-ui --agent claude-codeInstalls into .claude/skills of the current project.
Files
shadcn/ui Component Development
Contents
- CLI Commands - Installing and adding components
- Quick Reference - cn(), basic CVA pattern
- Component Anatomy - Props typing, asChild, data-slot
- Component Patterns - Compound components
- Styling Techniques - CVA variants, modern CSS selectors, accessibility states
- Decision Tables - When to use CVA, compound components, asChild, Context
- Common Patterns - Form elements, dialogs, sidebars
- Reference Files - Full implementations and advanced patterns
CLI Commands
Initialize shadcn/ui
npx shadcn@latest init
This creates a components.json configuration file and sets up:
- Tailwind CSS configuration
- CSS variables for theming
- cn() utility function
- Required dependencies
Add Components
# Add a single component
npx shadcn@latest add button
# Add multiple components
npx shadcn@latest add button card dialog
# Add all available components
npx shadcn@latest add --all
Sponsors
Details
- Repository
- github.com/existential-birds/beagle
- Category
- Frontend Development
- First seen
- Jun 3, 2026
More from existential-birds/beagle
All 40- React Flow Code Review324
- Langgraph Architecture282
- Swiftui Code Review273
- Tutorial Docs271
- Bubbletea Code Review265
- Zustand State258
- Adr Writing250
- Dagre React Flow247
- Swift Code Review247
- Pytest Code Review232
- Sqlalchemy Code Review225
- Pydantic Ai Common Pitfalls221
- Pydantic Ai Agent Creation219
- Agent Architecture Analysis217
- Ai Elements209
- Go Code Review204
- Shadcn Code Review204
- Swift Testing Code Review194
- Sqlite Vec171
- Pydantic Ai Tool System161
- Deepagents Architecture160
- Langgraph Implementation160
- Pydantic Ai Testing146
- Pydantic Ai Dependency Injection141