skills/pproenca/dot-skills/shadcn-ui-best-practices

shadcn-ui-best-practices

SKILL.md

shadcn/ui Best Practices

Comprehensive best practices guide for shadcn/ui applications, designed for AI agents and LLMs. Contains 48 rules across 8 categories, prioritized by impact to guide component composition, styling, accessibility, and performance optimization.

When to Apply

Reference these guidelines when:

  • Installing and configuring shadcn/ui in a project
  • Composing component structures with Dialog, Select, or Dropdown
  • Implementing theming with CSS variables and dark mode
  • Building accessible forms with validation and error handling
  • Creating data tables with TanStack Table integration

Rule Categories by Priority

Priority Category Impact Prefix
1 CLI & Project Setup CRITICAL setup-
2 Component Composition CRITICAL comp-
3 Styling & Theming HIGH style-
4 Accessibility Patterns HIGH access-
5 Form Integration MEDIUM-HIGH form-
6 Data Display Components MEDIUM data-
7 Layout & Navigation MEDIUM layout-
8 Performance Optimization LOW-MEDIUM perf-

Quick Reference

1. CLI & Project Setup (CRITICAL)

2. Component Composition (CRITICAL)

3. Styling & Theming (HIGH)

4. Accessibility Patterns (HIGH)

5. Form Integration (MEDIUM-HIGH)

6. Data Display Components (MEDIUM)

7. Layout & Navigation (MEDIUM)

8. Performance Optimization (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

File Description
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules
metadata.json Version and reference information
Weekly Installs
2
Installed on
opencode2
codex2
claude-code2
kilo1
windsurf1
zencoder1