What is a checkbox?
A checkbox is a small square the user ticks to say “yes, include this”. Each checkbox is independent: ticking one doesn’t untick the others. And, unlike a toggle switchToggle switchAn on/off control that applies a setting immediately, like Wi-Fi or Dark mode.Open in glossary →, ticking a checkbox usually does nothing on its own. The choice is applied when the user presses a button like Continue, Save or Pay.
You’ll see checkboxes used for:
- A single yes/no in a form: I agree to the Terms, Remember me, Billing address is the same as delivery.
- Picking several items from a list: cuisines in a food app filter, newsletter topics, pizza toppings.
- Bulk actionsBulk actionAn action applied to several selected items at once, like Delete, Archive or Mark as paid.Open in glossary →: ticking emails, photos or files, then pressing Archive or Delete.
- Consent: Send me offers by email, Share my data with partners.
Anatomy
Email me about
You can change this any time in Settings.
- 1
Group label (optional)
Says what the set of checkboxes is about. On the web it is a <legend> inside a <fieldset>.
- 2
Box (container)
Empty when unchecked, filled when checked. A dash means "mixed": some, but not all, items below are checked.
- 3
Checkmark
Shows the checked state with a shape, not only a color.
- 4
Label
Says what you agree to or pick. Tapping it must toggle the box too.
- 5
Touch target
The tappable area. The box is only about 18 px, but the target must be at least 44×44 pt (iOS) or 48×48 dp (Android).
- 6
Helper or error text
Extra info, or the error when a required box was left unchecked ("You need to accept the Terms").
The states
A checkbox has more states than “ticked or not”. Each one needs testing:
| State | Looks like | Meaning |
|---|---|---|
| Unchecked | Empty box | Not selected |
| Checked | Filled box with a tick | Selected |
| Mixed (indeterminateIndeterminate stateThe 'mixed' state of a parent checkbox, shown as a dash, when only some of its children are checked.Open in glossary →) | Filled box with a dash | Parent of a list where some children are checked |
| Disabled | Faded, keeps its tick or not | Can’t be changed right now |
| Error | Red box + error text | A required box was left unchecked |
| Focused | Ring or highlight around it | Keyboard focus is here (web, external keyboards) |
Checkbox vs toggle switch vs radio button
The fastest way to spot a wrong component is to ask two questions: can the user pick more than one? and does it apply immediately?
| Component | How many? | When it applies | Example |
|---|---|---|---|
| Checkbox | Zero, one or many | On Submit / Save | Toppings, “I agree to the Terms” |
| Toggle switch | One setting, on/off | Immediately | Dark theme, Wi-Fi |
| Radio buttonsRadio buttonA round option in a group where exactly one can be selected; choosing one unselects the others.Open in glossary → | Exactly one of a few | Usually on Submit | Standard / Express delivery |
| Segmented control | Exactly one of 2–5 | Immediately | Day / Week / Month |
See also the radio button, toggle switch and segmented control pages.
Designs & variants
The idea is the same everywhere, but the platforms disagree on what it looks like. iOS doesn’t even have one.
Every checkbox here works. Click the label text too, and try Tab + Space.
Material 3 checkbox
AndroidAn 18 dp box with rounded corners inside a 48 dp touch target. A round highlight (state layer) appears on hover, press and focus.
Native web checkbox
WebA plain <input type="checkbox"> with a <label>. It looks slightly different in every browser, but keyboard, label clicks and screen readers work for free.
Custom web checkbox
WebStyled to match the brand. Built on a hidden real input, so it still works with the keyboard. Many custom checkboxes are just a <div>, and that's where the bugs live.
Cuisines
iOS: checkmarks in a list
iOSiOS has no checkbox control. Multi-select lists show a blue checkmark on the right of each selected row, and the whole row is tappable.
- Unchecked
- Checked
- Mixed
- Focused
- Disabled
- Disabled on
- Error
- Error on
All the states
Test each one, in light and dark mode. Disabled boxes keep showing their value. "Mixed" (indeterminate) only appears on a parent checkbox whose children are partly checked.
“Select all” and the mixed state
A parent checkbox that controls a list is one of the most bug-prone patterns in any app. The rule is simple, and it must hold after every click:
What the parent should show
2/5 selected · aria-checked="mixed"
Try: uncheck one email, check them all one by one, click the parent while it shows a dash, archive everything. The count, the parent and the Archive button must always agree.
What happens when you click a parent that shows a dash? Most apps select all, some clear all. Both are fine if the behavior is consistent and matches the spec. What’s never fine: the parent saying “all” when it isn’t, or a count that disagrees with the ticks.
Check this part
In a "Choose your pizza toppings" form with an Add to cart button, which control fits best?
You tick "Select all" in an inbox, then untick one email. What should the parent checkbox show?