Customization Guide
The T1 Component Library is designed to be highly customizable. This guide shows you how to customize styles, create custom variants, and extend the design system.Customizing Component Styles
Using the className Prop
All components accept aclassName prop that merges with the default styles:
Button.tsx:87), so it can override default styles:
Overriding Default Styles
You can override any default style using Tailwind utilities:Creating Custom Variants
Extending Button Variants
You can create a wrapper component with custom variants:Extending Card Variants
Based on the pattern fromCard.tsx:19, you can add new card styles:
Theme Customization
Modifying Design Tokens
Editglobals.css to customize the entire design system:
Creating Color Schemes
You can create multiple theme variants:Dark Mode Customization
Customize dark mode tokens inglobals.css:71:
Component-Specific Customization
Custom Input Sizes
Extend the Input component with custom sizes:Custom Card Compositions
Create reusable card patterns:Utility Class Helpers
Create helper functions for common customizations:Responsive Customization
Use Tailwind’s responsive prefixes:State-Based Customization
Customize styles based on component state:Advanced: Modifying Component Source
For deeper customization, you can modify the component source files:- Copy the component to your project
- Modify the variant styles object
- Add new props or functionality
- Import from your custom location
Best Practices
- Use className for one-off customizations
- Create wrapper components for reusable patterns
- Modify design tokens for global changes
- Extend type definitions when adding new variants
- Keep customizations consistent with the design system
- Test responsive behavior across breakpoints
- Maintain accessibility when customizing interactive elements