forms contract

Switch

iOS-style toggle for binary settings. Activates immediately on tap (no apply button).

Variants

  • default

Sizes

  • sm
  • md

Example

<label className="flex items-center justify-between"><span>Push notifications</span><Switch checked={enabled} onCheckedChange={save} /></label>

Usage rule

Activates on tap — no Save button needed for the setting itself.

The full Switch contract has 5 more rules, plus the do-not patterns. Get the full recipe.

Get the Switch contract in your project.