Switch

On or off, and it takes effect at once: no Save. Off, a soft grey track and a white thumb; on, it fills with the primary.

Playground

Size
<Switch bind:checked={notify} aria-label="Email me" />

In a row

Label on the left, switch on the right, so a column of them lines up.

Rules

  • Only for things that apply at once. Inside a form with a Save button, use a Checkbox.
  • The label says what's on, not what the switch does: "Email me", not "Turn on email".
  • sm only in dense places: table rows, toolbars.