What problem does it solve?
This Skill provides a structured approach to building scalable React components by applying composition patterns. It helps teams avoid boolean prop proliferation and promotes reusable APIs through compound components, render props, and context providers.
Core Features & Use Cases
- Explicit variants to replace boolean-driven components with dedicated, self-describing pieces (e.g., ThreadComposer, EditMessageComposer, ForwardMessageComposer).
- Compound components with a shared context to enable flexible assembly of UI without prop drilling.
- Context-driven state management and provider patterns that allow UI components to be reused across apps with different state implementations.
Quick Start
Apply these steps to transform a complex UI module:
- Identify a component with many boolean props that control different render paths.
- Create explicit variant components that assemble the necessary subcomponents.
- Introduce a Provider-based state container and split UI into Frame, Input, Footer, and other slots.
- Refactor existing UI to consume the new variants and interact with the shared provider.