Theming#
Color themes, runtime theme switching, and fonts. Declare a theme in code, switch
the active theme at runtime, look up resolved theme colors, and adjust the
application fonts. These names span two import paths — the two switch verbs are on
the top-level compose surface (bootstack.set_theme), the rest live in
bootstack.style — but they are one job, so the reference groups them together.
For task-oriented introductions see the Theming and Typography guides.
Theme switching#
Switch the active theme at runtime. Part of the top-level compose surface.
Set the active application theme. |
|
Toggle the active application theme between light and dark mode. |
Themes#
Declare a color theme in code, install it, and resolve color tokens against the active theme.
A color theme family declared in code. |
|
Return the name of the currently active theme. |
|
Get a hex color value from a color token based on the active theme. |
|
Return the list of all registered themes. |
Fonts#
Inspect and adjust the application fonts at runtime.
Return the installed UI font families available to the application. |
|
Set the application font family for all non-code text. |
|
Override the attributes of a single font token. |
Type aliases#
- type bootstack.style.ThemeMode#
Theme appearance mode —
'light'or'dark'.