Skip to main content
Load both theme stylesheets when your application can switch schemes. ThemeProvider selects a palette by applying the light or dark class.
The provider accepts an explicit scheme. Your application owns preference persistence and any system-preference handling. If you render on the server, use the same initial scheme on the server and client to avoid an initial palette mismatch.

Mix palettes

Set applyToRoot={false} on a nested provider to give a subtree a different palette. Both stylesheets must be loaded:
Use useThemeColorScheme() from twenty-ui/theme-constants to read the provider’s active scheme. In a Twenty front component, use useColorScheme() from twenty-sdk/front-component to read the workspace scheme supplied by the host.