Schalter — ui.switch
An/Aus-Schalter (Toggle) — checkbox-Semantik mit Switch-Optik über Tokens. 1.2.0 (14.10.2026): value = gesendeter Wert (leer = on wie bisher); gleicher Feldname mehrfach auf der Seite bekommt ab dem zweiten Vorkommen eine eigene ID.
UI Elementv1.3.0Formulareweb.documentweb.applicationdesktop.shell
Beispiele
Aus
An
Rechnungen werden nach Versand automatisch erzeugt.
Deaktiviert (an)
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
label * | string | — |
name * | string | — |
value | string | "" |
checked | boolean | false |
disabled | boolean | false |
hint | string | "" |
namePlaceholder | string | "" |
statePlaceholder | string | "" |
groupPlaceholder | string | "" |
groupRole | string: member | master | "member" |
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 | "" |
Events & Slots
Events: change
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--switch-track-off | var(--color-border-strong) |
--switch-track-on | var(--color-action-primary) |
--switch-thumb | var(--color-action-on-primary) |
Genutzte Design-Tokens
color.action.on-primary color.action.primary color.action.primary-hover color.border.strong color.brand.on color.text.default color.text.disabled color.text.muted duration.base easing.standard elevation.control elevation.raised focus.ring-color focus.ring-offset focus.ring-width font.family.default gradient.brand gradient.brand-hover radius.full size.05 size.2 size.3 size.4 size.8 state.disabled-opacity text.md text.xs