Customization
Customize themes using ThemeProvider's theme and themeOverride properties (applied to providers, not components).
The themeOverride property allows programmatic modifications to component themes. Use it to add base classes or change defaults for any subtree of your application.
Add CSS classes that apply to all instances of a component:
<ThemeProvider themeOverride={(theme) => { theme.button.base += ' uppercase tracking-wide'; theme.card.base += ' shadow-sm'; return theme;}}> <Button primary>Uppercase Button</Button> <Card>Card with Shadow</Card></ThemeProvider>Change the default boolean props for components:
<ThemeProvider themeOverride={(theme) => { theme.button.defaults = { ...theme.button.defaults, filled: true, rounded: true }; return theme;}}> <Button primary>Filled Rounded Button</Button></ThemeProvider>Note: For changing defaults, prefer using themeDefaults instead - it's simpler:
// Preferred approach for defaults<ThemeProvider themeDefaults={{ button: { filled: true, rounded: true }}}>Use themeOverride alongside themeDefaults and extraClasses:
<ThemeProvider themeDefaults={{ button: { primary: true } }} themeOverride={(theme) => { theme.button.base += ' font-semibold'; return theme; }} extraClasses={{ button: { primary: 'hover:shadow-lg' } }}> <Button>Fully Customized</Button></ThemeProvider>Child overrides build on parent modifications:
<ThemeProvider themeOverride={(theme) => { theme.button.base += ' uppercase'; return theme;}}> <Button>Uppercase</Button>
<ThemeProvider themeOverride={(theme) => { theme.button.base += ' tracking-widest'; return theme; }}> <Button>Uppercase + Wide Tracking</Button> </ThemeProvider></ThemeProvider>themeOverride when you need to add base CSS classes to all component instancesthemeDefaults when you want to change default boolean props (simpler syntax)extraClasses when you want to add classes based on active props