Mixins / Inside-out composition
The problem it solves
A reusable component often starts simple and accumulates customization requests over time:
Button
├─ className
├─ iconClassName
├─ compact
├─ destructive
├─ showTooltip
├─ trackClick
├─ ariaLabelOverride
├─ onFocusDecoration
└─ ...None of those props is individually unreasonable. The problem is that the component becomes the meeting point for every design-system, accessibility and product-specific concern that might ever want to decorate it.
The other common answer is to copy the render body at the call site and edit it. That keeps the component API small by giving up reuse.
Mixins offer a third option:
Button
├─ root slot
├─ icon slot
└─ label slot
caller
├─ BrandStyle → root, icon
├─ TooltipBehavior → root
└─ Analytics → rootThe component publishes the supported extension points once. Independent callers compose around that contract.