<StackTheme />

A component that applies a theme to its children.

For more information, please refer to the color and styles guide.

Props

  • theme (optional): ThemeConfig - Custom theme configuration to override the default theme.
  • children (optional): React.ReactNode - Child components to be rendered within the themed context.

Example

1const theme = {
2 light: {
3 primary: 'red',
4 },
5 dark: {
6 primary: '#00FF00',
7 },
8 radius: '8px',
9}
10
11// ...
12
13<StackTheme theme={theme}>
14 {/* children */}
15</StackTheme>