What it is
A control for one binary setting whose change takes effect immediately — no submit step, no group. That immediacy is what separates it from Checkbox, which implies membership in a form the reader submits as a batch.Live example
Exports
Vocabulary
This documentation calls this component Switch; if searching Titan source or the design
library directly, look for
Toggle instead — see
Open issues for why the two
names differ.
Choose Switch when
- The setting is standalone and takes effect the instant it changes — not part of a batch the reader submits together.
- The choice has exactly two states, with nothing in between.
Choose something else when
Anatomy
Variants, sizes, and states
Edge and failure states
Tokens
Composition
Where the label sits relative to the track — leading or trailing — is unconfirmed; see Open issues. Unlike Input, Select, Checkbox, and Radio, there is noFormInput type for Switch.
FormInput’s six types are text, radio, segmentedButton, select, checkbox, and
custom — verified directly from its source. Composing a labeled Switch field today means
either hand-assembling FormLabel/FormHelperText around it, or using type="custom" with a
Switch passed as children. Neither is a documented, decided pattern — see
Open issues.
Content
Accessibility
- Exposed with a switch role distinct from a checkbox role, so assistive technology announces “on”/“off” rather than “checked”/“unchecked” — the state language matches what the control promises (an immediate setting, not a form value).
- A Switch with no visible label carries an explicit accessible name.
Constraints
Known issues
Switch: open issues
Divergences, open decisions, and undocumented gaps for Switch.