Components › Forms & input › Choice › Switch

Switch

canon

On/off control that applies immediately.

Size sm (acrm !3911, AD 26 Sep 2026): 30×17, knob 13px, --shadow-xs, label var(--small) in --fg-secondary, gap --sp-2 — ONLY the secondary option in a dialog footer next to buttons (Další / Vytvořit další / Nevolat / Pozvánky); the full size would compete with the primary. Replaces the private .tk-more/.sw copy — migrated on 27 Sep 2026 (acrm !3950): TaskDialog „Další“, NewContactDialog „Vytvořit další“/„Nevolat“, NewMeetingForm „Pozvánky“/„Nahrávat“; .tk-more/.sw deleted, the app has ONE switch. Clickable label (acrm !3933, AD 26 Sep 2026): a click on the VISIBLE label toggles (not with labelHidden); focus stays on the role=switch button, onChange(on, event) keeps stopPropagation for clickable rows, no double toggle.

Used in 35 files · 16 areas · 52× — components/CheckMenu, components/assistant, components/datamart, components/mail, components/meetings, components/person …

Default

Include inactive
components--switch--defaultOpen standalone ↗Code

Variants

Include inactivelabel end — default
Track openslabel start — mail compose footer only
components--switch--variantsOpen standalone ↗Code

Sizes

Vytvořit dalšíVytvořit další
default — 34×20, label 13px --ink-800
Vytvořit dalšíVytvořit další
sm — 30×17, label 12px (--small) --fg-secondary · dialog footer next to buttons
components--switch--sizesOpen standalone ↗Code

States

Include inactiveoff
Include inactiveon
Focus: 3px ring (color-mix --accent 30%) on the track via `.acrm-switch:focus-visible`. No disabled style exists in inputs.css.
components--switch--statesOpen standalone ↗Code

Composition

Include inactiveOnly with e-mailFirst row is a header
stacked options — label to the right
Offer in the dialer
Show on the company card
Send a weekly digest
settings list — label left, switch right
components--switch--compositionOpen standalone ↗Code