use UI

Checkbox vs Toggle Switch

Both hold a yes or no, and they are chosen by when that answer takes effect. A switch applies the moment it is flipped, which is why settings screens have no Save button. A checkbox is a value the form collects and submits later. Swap them and you mislead: a switch above a Save button implies the change already happened, and a lone checkbox in a settings panel leaves the user hunting for a button that does not exist. The checkbox also keeps something the switch cannot have — a third, mixed state.

If the change is live the instant it is made, use a switch. If it waits for Save, use a checkbox.

Checkbox

A form control holding a boolean value, optionally indeterminate, submitted with the rest of the form.

Reach for it when

  • The value is collected now and applied on submit — terms accepted, options ticked, rows selected.
  • Several independent options can all be on at once. A group of checkboxes says “any of these”.
  • You need a parent that reflects its children: all, none, or some.

Avoid it when

  • The change applies immediately. That is a switch, and dressing it as a checkbox hides when it takes effect.
  • Exactly one option must be chosen. That is a radio group — checkboxes let someone tick two and then argue with your validation.
  • There is one option and it is a setting rather than a form value. A lone checkbox in a settings panel is usually a switch in disguise.

Toggle Switch

A control with two states that takes effect the moment it is flipped, with no separate confirmation.

Reach for it when

  • The change applies straight away — dark mode, notifications, a feature flag in a settings panel.
  • The state is a system condition rather than a value being collected: something is on or it is off.
  • The user may flip it repeatedly to see the effect, so a round trip through a Save button would be in the way.

Avoid it when

  • It sits in a form with a submit button. Then it is a checkbox, because nothing happens until submit.
  • The action is destructive or expensive. Instant effect plus no confirmation is a bad combination.
  • You need a third state. A switch cannot be indeterminate; a checkbox can.