What problem does it solve?
This Skill guides developers in designing flexible, reusable, and maintainable React components by providing implementations of advanced component patterns, preventing rigid APIs and prop drilling.
Core Features & Use Cases
- Compound Components: Build components with multiple related sub-components that share implicit state (e.g.,
Tabs, Accordion).
- Composition Patterns: Create complex UIs by composing simple, focused components (e.g.,
Card with Card.Header, Card.Body).
- Controlled vs Uncontrolled: Design form inputs that gracefully support both controlled (external state) and uncontrolled (internal state) modes.
- Use Case: When building a new
Dropdown component that needs to manage its own internal state but also allow external control, use this skill to implement the controlled/uncontrolled pattern, ensuring maximum flexibility.
Quick Start
Use the component-patterns skill to generate a Card component using the composition pattern, including Header, Body, and Footer sub-components.