LearnDesign System InsightsSwitch toFullFixedProps vs. Slots in Component ArchitectureUnderstanding when to use props vs. slots for component flexibility and controlCore Insight: Use props for behavior control, slots for content flexibility Copy linkWhen to Apply Component design phase → Deciding component API structureComponent refactoring → Improving existing component flexibilityDesign system architecture → Planning component hierarchy Copy linkWhy This Works ✓ Clear separation - Alex (Nord): "Props for strictly defined behaviors, slots for any content"✓ Predictable behavior - Props enable validation and consistent component behavior✓ Flexible composition - Slots allow teams to adapt components to varied use cases✓ Better tooling - Props provide better developer experience with autocomplete and validation Copy linkAlternative Approaches Props for everything - Maximum control → Limits flexibility, creates API bloatSlots for everything - Maximum flexibility → Inconsistent usage, harder to maintainMixed without strategy - Seems flexible → Confusing API, unpredictable behavior Copy linkQuick Example example.tsxCopy codeCopy code<!-- Props for behavior --><Button size="large" variant="primary" disabled={false}> Click me</Button> <!-- Slots for content --><Card> <CardHeader> <Avatar src="user.jpg" /> <UserInfo name="Jane" role="Designer" /> </CardHeader> <CardContent> <p>Any content structure here</p> </CardContent></Card> Copy linkRelated Insights Component Tagging Strategies - Tracking component usage patternsMultiple Themes - How props and slots work with theming Sources: Nord Design System Session • February 2025
Props vs. Slots in Component Architecture
Core Insight: Use props for behavior control, slots for content flexibility
Sources: Nord Design System Session • February 2025