composition-pattern
Installation
SKILL.md
Composition Pattern
Build flexible, reusable UI by accepting dynamic content instead of configuration props. Components define structure; consumers provide content.
When to Use
- Building reusable component libraries or design systems
- Layout components (cards, modals, tabs, accordions) with variable content
- Components that need flexible content slots
- Reducing prop drilling through composition
Don't use for:
- Simple one-off components with fixed content
- Components with no content variation between uses