← Components/primitives

Switch

Compact iOS-style on/off switch. Distinct from Toggle (which is the labeled form-field variant with explicit Off / On text). Switch is used as a row affordance, often with the label as a separate <label> adjacent to it.

primitivesstablea11y: untested3/3 coverageEdit on GitHub ↗
primitives-switch--defaultOpen all variants →

When to use

  • Binary on/off control inline within a row, where the label lives separately (e.g. settings list, table column visibility).
  • Dense surfaces where Toggle's inline "Off" / "On" text would be visual noise.

When not to use