function setWebTheme()
Applies a theme to the web application.
function setWebTheme(theme: WebTheme): void;
Notes
- Dark mode is handled automatically based on Viewport.prefersDark, if colors and/or icons are defined as part of the theme.
- Triggers a renderer remount to apply all new styles and re-evaluate color values.
- Can be called during the useWebContext() configuration callback or later at runtime.
Parameters
- theme — The theme to apply.
Examples
// Apply a theme with custom colors
setWebTheme(new WebTheme()
.colors({ accent: "#FF5722" })
.darkColors({ accent: "#FF7043" })
);
