API Reference
setTheme
Programatically set the custom theme.
A function that sets the current custom theme, not to be confused with setMode
, which sets the mode ('light'
, 'dark'
or 'system'
).
The theme can be set to any arbitrary string value, and is persisted to localStorage and applied to the root html
element via the data-theme
attribute.