Theme-Umschalter — component.theme-switcher
Theme-Umschalter für Hell/Dunkel/System oder den Theme-Katalog. Website-Modus mit optionalem Fenster-/Bereichs-Scope: App und Subapp wählen unabhängig vom Desktop; die temporäre Auswahl wird pro scopeKey gemerkt und über Standard zurückgesetzt. 1.6: feste Texte mehrsprachig (invisible_i18n). 1.9.0 (
Beispiele
Icons (Hell / Dunkel / System — wirkt sofort auf die Seite)
Mit Beschriftungen
Website-Themes (inline)
Katalog mit Gruppen, Leisten-Variante (dock, 1.4.0)
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
lightTheme | string | "" |
darkTheme | string | "demo-dark" |
labels | boolean | false |
mode | string: appearance | website | desktop | "appearance" |
desktopCycle | string: all | manual | "all" |
label | string | "Design" |
source | string: list | all | "list" |
frameTheme | string | "" |
frameThemeDark | string | "" |
themes | array | [] |
defaultLabel | string | "Standard" |
variant | string: floating | inline | dock | "floating" |
padding | string: standard | none | sm | md | lg | xl | "standard" |
margin | string: standard | none | sm | md | lg | xl | "standard" |
border | string: standard | none | hairline | strong | "standard" |
radius | string: standard | none | control | surface | pill | "standard" |
textColor | string | "" |
backgroundColor | string | "" |
shadow | string: standard | none | sm | md | lg | "standard" |
width | string: standard | full | "standard" |
alignSelf | string: standard | start | center | end | "standard" |
anchor | string | "" |
scope | string: document | window | region | "document" |
scopeKey | string | "" |
Events & Slots
Events: change
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--theme-switcher-elevation-control | var(--elevation-control) |
--theme-switcher-focus-ring-color | var(--focus-ring-color) |
--theme-switcher-focus-ring-offset | var(--focus-ring-offset) |
--theme-switcher-focus-ring-width | var(--focus-ring-width) |
--theme-switcher-radius-full | var(--radius-full) |
--theme-switcher-surface-default | var(--color-surface-default) |
--theme-switcher-surface-sunken | var(--color-surface-sunken) |
--theme-switcher-text-default | var(--color-text-default) |
--theme-switcher-text-muted | var(--color-text-muted) |
--theme-switcher-surface-overlay | var(--color-surface-overlay) |
--theme-switcher-border | var(--color-border-default) |
--theme-switcher-border-strong | var(--color-border-strong) |
--theme-switcher-elevation-overlay | var(--elevation-overlay) |
--theme-switcher-radius-panel | var(--radius-surface) |
--theme-switcher-radius-item | var(--radius-control) |
--theme-switcher-active | var(--color-accent-soft) |
Genutzte Design-Tokens
border.hairline color.accent-soft color.border.default color.border.strong color.surface.default color.surface.overlay color.surface.sunken color.text.default color.text.muted container.sm duration.fast easing.standard elevation.control elevation.overlay focus.ring-color focus.ring-offset focus.ring-width font.family.default layer.dropdown layer.sticky radius.control radius.full radius.surface size.05 size.1 size.10 size.2 size.24 size.3 size.4 size.5 size.8 text.sm text.xs weight.semibold