What problem does it solve?
This Skill helps you design compound React components that keep behavior isolated from styling so you can build accessible, Radix-style UI primitives without coupling implementation details to presentation.
Core Features & Use Cases
- Unstyled compound primitives: Create composable React components where consumers control rendering and styling.
- Context-driven behavior with fail-fast safety: Provide internal state via context and throw a clear error when used without the required provider (e.g., outside
Component.Root).
- Render props for consumer state access: Expose internal state to consumers without exporting hooks, enabling deterministic UI integration patterns.
- API patterns for polymorphism and collections: Support
asChild via Radix Slot, forward refs, use data attributes for state styling, and pre-compute props arrays with useMemo.
Quick Start
Ask your AI to produce an unstyled Component.Root + namespaced consumer components (like Trigger and Content) that use context internally, support asChild, and expose state to consumers via render props.