Component Examples Library
Centralized collection of reusable component examples with live code and GitHub source links
Component Examples Library
Single Source of Truth: This library contains all component examples referenced throughout our documentation. Each example includes live code, usage patterns, and links to the actual implementation in our GitHub repository.
Overview
This centralized examples library serves as the definitive reference for component implementations across our UI Architecture Overview. All documentation pages reference these examples rather than duplicating code.
Benefits
- DRY Compliance: No duplicated examples across documentation
- Live Code: All examples are tested and functional
- GitHub Integration: Direct links to source implementations
- Versioned: Examples stay synchronized with codebase
- Searchable: Easy to find specific component patterns
Foundation Components
Essential building blocks with no business logic:
Button
Primary action component with variants and states
Input
Text input with validation and error states
Text
Typography component with semantic variants
Card
Content container with elevation
Pattern Components
Composed UI patterns built from foundation components:
Modal
Overlay dialogs with header, body, and actions
Form
Complete form with validation and submission
DataTable
Data grid with sorting and filtering
SearchBox
Search input with suggestions
Business Components
Domain-aware components with integrated business logic:
ProductCard
Product display with pricing and actions
UserAvatar
User profile image with status
OrderStatus
Order state visualization
AddToCart
Shopping cart integration
Example Structure
Each example follows a consistent structure:
Usage in Documentation
To reference an example in any documentation page:
Or embed the example directly:
Contributing
When adding new examples:
- Create example file in the appropriate layer directory
- Include metadata with title, description, source, and docs links
- Add interactive preview using ExamplePreview component
- Document all variants and use cases
- Link to GitHub source for the actual implementation
- Update this index to include the new example
Maintenance
Examples are reviewed and updated:
- On component API changes
- During quarterly documentation reviews
- When new patterns emerge
- Based on developer feedback
Looking for specific examples? Use the search bar or browse by category above.