shadcn

shadcn/ui component library best practices and patterns (formerly shadcn-ui). This skill should be used when writing, reviewing, or refactoring shadcn/ui components to ensure proper architecture, accessibility, and performance. Triggers on tasks involving Radix primitives, Tailwind styling, form validation with React Hook Form, data tables, theming, or component composition patterns.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "shadcn" with this command: npx skills add thongdn-it/react-agent-skills/thongdn-it-react-agent-skills-shadcn

shadcn/ui Community Best Practices

Comprehensive best practices guide for shadcn/ui applications, maintained by the shadcn/ui community. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new shadcn/ui components or composing primitives
  • Implementing forms with React Hook Form and Zod validation
  • Building data tables or handling large dataset displays
  • Customizing themes or adding dark mode support
  • Reviewing code for accessibility compliance

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Component ArchitectureCRITICALarch-
2Accessibility PreservationCRITICALally-
3Styling & ThemingHIGHstyle-
4Form PatternsHIGHform-
5Data DisplayMEDIUM-HIGHdata-
6Component CompositionMEDIUMcomp-
7Performance OptimizationMEDIUMperf-
8State ManagementLOW-MEDIUMstate-

Quick Reference

1. Component Architecture (CRITICAL)

2. Accessibility Preservation (CRITICAL)

3. Styling & Theming (HIGH)

4. Form Patterns (HIGH)

5. Data Display (MEDIUM-HIGH)

6. Component Composition (MEDIUM)

7. Performance Optimization (MEDIUM)

8. State Management (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For a single-file reference containing all rules, see AGENTS.md.

Reference Files

FileDescription
AGENTS.mdComplete compiled guide with all rules
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

vitest

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

react-hook-form

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

web-design-guidelines

No summary provided by upstream source.

Repository SourceNeeds Review