Design System GuideDS Guide
Docs
Docs
18. Component API Design18.1 Prefer semantic props18.2 Avoid boolean explosion18.3 Composition over mega-components18.4 Controlled vs uncontrolled APIs18.5 Escape hatches
19. Patterns, Templates, and Product-Specific Components
18. Component API Design

18.1 Prefer semantic props

Component API Design · Section 18.1

Bad:

<Button blue rounded shadow>

Better:

<Button variant="primary" size="md">

The second describes intent rather than visual implementation.

18. Component API Design

Design semantic, composable, and flexible component APIs.

18.2 Avoid boolean explosion

Component API Design · Section 18.2