Overview
Stride Design System is built for customization. You can:- Override CSS variables to change colors, spacing, and sizing globally
- Extend component variants using class-variance-authority (CVA)
- Compose styles with the
cn()utility - Create custom brands with full token control
- Wrap components to add custom behavior
Overriding CSS Variables
The easiest way to customize is by overriding CSS custom properties:Global Customization
Brand-Specific Overrides
Customize tokens for specific brands:Brand Overrides
Component-Scoped Overrides
Override tokens for specific components:Scoped Variable Override
Using the cn() Utility
Thecn() utility (clsx + tailwind-merge) intelligently combines Tailwind classes:
cn() Utility (utils.ts)
Basic Usage
Component Composition
Extend components with custom classes:Extending Button
Creating Custom Variants
Extend existing variants using CVA (class-variance-authority):Wrapping Components
Create wrapper components with custom defaults:Custom Brand Creation
Create a completely custom brand dynamically:Theming Specific Components
Target individual component instances:TypeScript Customization
Extend component prop types:Custom Component Types
Dark Mode Customization
Customize dark mode tokens:Dark Mode Overrides
Animation Customization
Customize component animations:Custom Animations
Best Practices
Use CSS variables for global changes
Use CSS variables for global changes
Override tokens in
:root or brand classes rather than hardcoding values:Use cn() for class composition
Use cn() for class composition
Always use
cn() when combining classes to avoid conflicts:Test across all brands
Test across all brands
If you customize components, test them with all brand themes:
Maintain semantic token usage
Maintain semantic token usage
Even when customizing, reference semantic tokens:
Examples
E-commerce Button
Dashboard Card
Auth Input
Notification Badge
Next Steps
Theming System
Understand the token architecture
Multi-brand
Create and manage multiple brands
Component Library
Explore all customizable components
API Reference
cn() utility and TypeScript types