This skill helps you design, review, and refactor React UI components with accessibility, composition, and TypeScript APIs following the components.build
npx playbooks add skill nolly-studio/components-build-skill --skill components-build
Comprehensive guidelines for building modern, composable, and accessible UI components. Contains 16 rule categories covering everything from core principles to distribution, co-authored by Hayden Bleasel and shadcn.
Reference these guidelines when:
| Priority | Category | Focus | Prefix |
|----------|----------|-------|--------|
| 1 | Overview | Specification scope and goals | overview |
| 2 | Principles | Core design philosophy | principles |
| 3 | Definitions | Common terminology | definitions |
| 4 | Composition | Breaking down complex components | composition |
| 5 | Accessibility | Keyboard, screen readers, ARIA | accessibility |
| 6 | State | Controlled/uncontrolled patterns | state |
| 7 | Types | TypeScript props and interfaces | types |
| 8 | Polymorphism | Element switching with as prop | polymorphism |
| 9 | As-Child | Radix Slot composition pattern | as-child |
| 10 | Data Attributes | data-state and data-slot | data-attributes |
| 11 | Styling | Tailwind CSS, cn utility, CVA | styling |
| 12 | Design Tokens | CSS variables and theming | design-tokens |
| 13 | Documentation | Component documentation | documentation |
| 14 | Registry | Component registries | registry |
| 15 | NPM | Publishing to npm | npm |
| 16 | Marketplaces | Component marketplaces | marketplaces |
overview - Specification scope, goals, and philosophyprinciples - Composability, accessibility, customization, transparencydefinitions - Common terminology (primitive, compound, headless, etc.)composition-root - Root component with Context for shared statecomposition-item - Item wrapper componentscomposition-trigger - Interactive trigger componentscomposition-content - Content display componentscomposition-export - Namespace export patternaccessibility-semantic-html - Use appropriate HTML elementsaccessibility-keyboard - Full keyboard navigation supportaccessibility-aria - Proper ARIA roles, states, and propertiesaccessibility-focus - Focus management and restorationaccessibility-live-regions - Screen reader announcementsaccessibility-contrast - Color contrast requirementsstate-uncontrolled - Internal state managementstate-controlled - External state delegationstate-controllable - Support both patterns with useControllableStatetypes-extend-html - Extend native HTML attributestypes-export - Export prop types for consumerstypes-single-element - One component wraps one elementpolymorphism-as-prop - Change rendered element typepolymorphism-typescript - Type-safe polymorphic componentspolymorphism-defaults - Semantic element defaultsas-child-slot - Radix Slot for prop mergingas-child-composition - Compose with child componentsdata-attributes-state - Use data-state for styling statesdata-attributes-slot - Use data-slot for targeting sub-componentsstyling-cn-utility - Combine clsx and tailwind-mergestyling-order - Base → Variants → Conditionals → User overridesstyling-cva - Class Variance Authority for variantsstyling-css-variables - Dynamic values with CSS variablesdesign-tokens-css-variables - Define tokens as CSS variablesdesign-tokens-theming - Support light/dark modes and themesdocumentation-props - Document all props with JSDocdocumentation-examples - Provide usage examplesregistry-structure - Registry file structureregistry-schema - Component metadata schemanpm-package-json - Package configurationnpm-exports - Module exportsmarketplaces-distribution - Component distribution strategiesRead individual rule files for detailed explanations and code examples:
rules/composition/SKILL.md
rules/accessibility/SKILL.md
rules/styling/SKILL.md
Each rule file contains:
For the complete guide with all rules expanded: AGENTS.md
cn() utility with tailwind-mergeCo-authored by:
Adapted as an AI skill by:
Based on the [components.build](https://components.build) specification.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.