Component API Design

guidelines for building shared components

Photo by Daniel McCullough on Unsplash

Overview

Make the Correct Choices Easy

Intuitive

High-level Accordion Component Example
High-level FeatureList Component Example
<Button variant="danger">Cancel Your account</Button>
Button Component Example
Alert Component Example
Accordion Header Component Example
Text and Button Example Component Examples

Discoverable

Standardized

Make incorrect choices obvious

Type-checking

Consistent styling patterns

Deprecation warnings

Provide helpful off-ramps

Handling edge cases

Composability

Composable Accordion Component Example

Clear communication

Thanks for Reading!

design systems @workday