ThemeRoot.svelte

ThemeRoot adds global color scheme and theme support to the page. It also sets in the Svelte context a reactive theme_state containing the theme and color scheme.

Declarations
#

view source

ThemeRoot
#

ThemeRoot.svelte view source

sync_color_scheme?

type typeof default_sync_color_scheme
optional

load_color_scheme?

type typeof default_load_color_scheme
optional

save_color_scheme?

type typeof default_save_color_scheme
optional

load_theme?

type typeof default_load_theme
optional

save_theme?

type typeof default_save_theme
optional

theme_fallback?

type Theme | undefined
optional

theme_state?

A reactive class containing the selected theme and color scheme. Defaults to the first default theme.

optional

children

type Snippet< [theme_state: ThemeState, style: string | null, theme_style_html: string | null] >

Depends on
#