Web Design & UI/UX7 min read

Switch vs Checkbox: When to Use a Toggle and When to Use a Checkbox

A switch works the moment it is flipped. A checkbox waits for Save. Both patterns rebuilt on a notifications screen and a settings form, the three mistakes that mix them up, and a decision table for ten common controls.

By Boone
XLinkedIn
Switch vs Checkbox: When to Use a Toggle and When to Use a Checkbox

A switch and a checkbox both say yes or no, so teams treat them as the same control in two costumes. They are not. One acts the moment it is flipped, the other waits for a button. Below: the question that decides it, both patterns rebuilt on real screens, three mistakes and a decision table.

The one question: does it work before Save?

Ask what happens the instant someone taps. If the app changes right away, with no button to confirm, it is a switch. If the choice is only recorded when the person taps Save, Submit or Create account, it is a checkbox.

Nielsen Norman Group puts it plainly: "Toggle switches should take immediate effect and should not require the user to click Save or Submit to apply the new state." A switch looks like a light switch, and people expect it to act like one. A checkbox looks like a mark on paper, which only counts once it is handed in.

The switch: it works the moment it is flipped

An iOS style Notifications screen with an Alerts group of four rows, Messages and Mentions switched on in green, Reminders and Product news switched off

A switch is a pill with a knob that slides between off and on. It is right when:

  • The change happens right away. Turn Messages off and message alerts stop. No button needed.
  • It turns one thing on or off. Each row is a single setting with two opposing states.
  • It sits in a list of settings. Apple's guidance is specific: "Use the switch toggle style only in a list row."

This is the pattern of the iPhone's own Settings app, where every notification option is a row with a switch at the end. Apple describes the control as one that "lets people choose between a pair of opposing states, like on and off," and its default on color is system green, #34C759.

Where it fails: anywhere a button finishes the job. A switch promises instant change, so a Save button underneath breaks the promise.

Checkboxes: nothing changes until Save

A settings form titled Email me about with four checkboxes, Messages and Mentions checked, Reminders and Product news empty, and Cancel and Save Changes buttons

A checkbox is a square that takes a check mark. It is right when:

  • Nothing changes until people tap Save. The form collects choices, the button applies them all at once.
  • People can pick any number of options, even none. Jakob Nielsen describes checkboxes as the control where "the user may select any number of choices, including zero, one, or several."
  • It sits in a form, next to other fields. Text fields, dropdowns and checkboxes all wait for the same button.

Gmail's web settings work this way: pages of checkboxes and radio buttons, then a Save Changes button at the bottom. Change your mind, tap Cancel, and nothing happened.

Where it fails: a settings list with no Save button. A checked box reads as a pending choice, so people go looking for the button that confirms it.

Mistake 1: a switch inside a form with Save

Wrong: switches above a Save button

An Email me about form with four switches, two on, and Cancel and Save Changes buttons

Right: checkboxes above a Save button

An Email me about form with four checkboxes, two checked, and Cancel and Save Changes buttons

On the left, someone flips Mentions on. Did it work? The switch says yes, the Save button says not yet.

If they leave without saving, they lose a change the screen told them was done. If they tap Cancel, they cannot be sure the switch went back.

NN/g calls this out directly: in long forms where people "will need to click a Submit button for other changes to take effect, don't. This scenario confuses users because they can't be sure whether their toggle choice will take immediate effect." On the right, the checkboxes make no promise until Save, so the screen and the button agree.

Mistake 2: checkboxes in a settings list with no Save

Wrong: checkboxes that apply instantly

A Notifications screen with four rows ending in checkboxes and no Save button

Right: switches that apply instantly

The same Notifications screen with four rows ending in switches

This is the same mix-up the other way round. The left screen saves every tap at once, but its checkboxes look like answers waiting to be submitted, so people scroll for a button that is not there. On the right, the switches look like what they do: each one is already on or already off.

Mistake 3: a switch for one yes in a form

Wrong: a switch to agree to the terms

A Create your account form with email and password fields and a switch next to I agree to the Terms and Privacy Policy

Right: a checkbox to agree to the terms

The same form with a checked checkbox next to I agree to the Terms and Privacy Policy

A single on or off choice is not automatically a switch. Agreeing to the terms does nothing on its own: it only counts when the account is created. That makes it part of the form, so it gets a checkbox. Count what happens on tap, not how many options there are.

Switch or checkbox: a decision table

ControlPickWhy
Push notifications on or offSwitchWorks the moment it is flipped
Wi-Fi, Bluetooth, Airplane modeSwitchOne setting, instant effect
Dark mode in app settingsSwitchThe screen changes as soon as it is flipped
Which emails to receive, in a form with SaveCheckboxSeveral choices, applied together on Save
I agree to the TermsCheckboxOnly counts when the form is submitted
Remember me on a log in screenCheckboxApplied when people tap Log in
Filters in a sheet with an Apply buttonCheckboxAny number, nothing changes until Apply
Selecting rows in a list to deleteCheckboxSeveral items, then one action
A single setting inside a long profile formCheckboxThe form's Save applies it
Auto-play videos in a settings listSwitchOne setting, instant effect

If only one option out of a few can be chosen, neither control is right: that is a radio button group. Our dropdown vs radio buttons guide covers that choice.

Build it right in code

The two controls are announced differently to people using a screen reader, so build each one as what it is. MDN describes the ARIA switch role as "functionally identical to the checkbox role," except that it represents the states "on" and "off" instead of checked and unchecked.

html
<!-- Switch: applies the moment it is flipped --> <button type="button" role="switch" aria-checked="true" id="alerts-messages"> <span class="knob" aria-hidden="true"></span> </button> <label for="alerts-messages">Messages</label> <!-- Checkbox: applied when the form is saved --> <label> <input type="checkbox" name="email" value="mentions" checked> Mentions </label>

The values we used on the screens above, for copying:

Tap a color to copy its code.

The green is Apple's system green. Apple lets an app use its own accent color for switches instead, as long as on stands out clearly from off. The blue is our own pick for the checkbox form.

For settings screens beyond the control itself, read the settings page problem, and for everything else on a form, our form design best practices.

FAQ

What is the difference between a switch and a checkbox?

A switch applies its change the moment it is flipped. A checkbox records a choice that is applied later, when people tap Save or Submit.

When should I use a toggle switch?

Use a switch for a single setting that takes effect right away, in a list of settings, like turning notifications on or off. It should never need a Save button.

When should I use a checkbox instead of a toggle?

Use checkboxes in forms that end with Save or Submit, and whenever people can pick several options, or none, from a list.

Can I use a toggle switch in a form?

Not in a form that needs a Save or Submit button. People cannot tell whether the switch has already taken effect. Use a checkbox there.

Should "I agree to the terms" be a switch or a checkbox?

A checkbox. Agreeing only counts when the form is submitted, so it belongs with the other form fields.

Sources

More from Brainy Papers

Keep reading