A component with 30 props is a config monster. A component with 2 props and no flexibility is a cage. The middle ground — flex without fuss — is where component APIs pay off.

Props vs slots

Props are for configuration. Slots (children, or named slots) are for composition. A Card with a “header” prop is less flexible than a Card with a header slot. When you’re tempted to add a 15th prop, the answer is usually a slot.

Controlled vs uncontrolled

Support both. Uncontrolled by default (the component manages its own state), controlled when needed (the consumer passes state). Don’t force consumers to wire state for simple cases — but don’t lock them out of control for complex ones.

Variants, not themes

Button variants (primary, secondary, ghost) are product decisions. Button themes (light, dark) are infrastructure. Keep them separate. Consumers should pass variant; the system should handle theme via context.

Escape hatches

Every component needs a controlled escape hatch for the 5% of cases the API didn’t anticipate: className override, style override, or a render prop. Without one, consumers will fork your component or hack around it with CSS overrides.

This is the craft behind every system we ship under Logicore and New Products.