Home
Bookmarks
Leagues
LEARN
Courses
Career Paths
Assessments
Tutorials
Arcade
Glossary
GROW
Certifications
Log in
Glossary
Log inSign up
Courses/Introduction to Design Systems/Atomic Design & Modular Component Architecture/
Exercise #5

Component Composition vs 'Prop Explosion'

A major failure pattern in component libraries is Prop Explosion (also known as the God Component). A developer wants a Card to support an icon, so they add hasIcon. Another wants a subtitle, so they add subtitle. Another wants a badge, a footer button, an avatar, and a secondary action:

// ❌ ANTI-PATTERN: Prop Explosion (Rigid & Fragile)
<Card
  title="Pro Plan"
  hasIcon={true}
  iconName="star"
  badgeText="Popular"
  badgeColor="green"
  buttonText="Upgrade"
  showFooterBorder={false}
/>

The Remedy: Compound Components (Composition)

// ✅ BEST PRACTICE: Compound Composition (Flexible & Resilient)
<Card>
  <Card.Header>
    <Icon name="star" />
    <Card.Title>Pro Plan</Card.Title>
    <Badge variant="success">Popular</Badge>
  </Card.Header>
  <Card.Footer>
    <Button variant="primary">Upgrade</Button>
  </Card.Footer>
</Card>

Composition allows consuming squads to assemble components freely without asking the design system team to add new boolean flags for every permutation.

Topics

Brad Frost's Atomic Design Methodology
Atoms: The Indivisible Building Blocks
Molecules: Composition & Single Responsibility
Organisms: Distinct Functional Sections
Component Composition vs 'Prop Explosion'
Principles of Clean Component API Design
Handling the 4 Essential Component States
Templates & Pages: Testing Stress & Edge Cases
Headless UI Primitives & Unstyled Foundations
Challenge: Deconstructing a Flight Booking Card

From lesson

1

Atomic Design & Modular Component Architecture

Level 4 · Component Architecture & Visual Language

Top contributors

Community contribution details will appear here once real learner activity is available.

Share