Skip to main content

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 no FormInput 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.
What this component does not handle: confirming the change, or reporting whether it succeeded — see TITAN-GAP-22.

Constraints

Known issues

Switch: open issues

Divergences, open decisions, and undocumented gaps for Switch.

Why it works this way

Immediate effect is the entire semantic difference from Checkbox. A Switch that required a submit step would be a Checkbox with extra styling; the value of having both controls is that their shape alone tells the reader whether an action is pending or already done.

Status

  • Checkbox — the batch-submitted counterpart
  • Radio — for more than two states or grouped exclusivity
Last modified on September 2, 2026