Components · Forms · Checkbox
Back to Checkbox typesCheckbox
Use for agreements, multi-select lists and settings rows where more than one option can be active at once - one Checkbox component, controlled by properties, with a real tri-state (unchecked, checked, indeterminate) control underneath.
Properties
Size and label are properties of the same component, not separate checkboxes - change them below to check this control's style and states in the Live Preview. The box's own icon artwork has a fixed corner rounding baked in, so there's no separate Corner radius property.
Live Preview
Both types compared side by side, each in all 6 states. One full matrix is rendered per selected Size.
When to use
Any choice where more than one option can be selected at once, or where a single agreement needs an explicit on/off toggle.
Validation
A single required checkbox, like a Terms of Service agreement, has no half-checked state to catch on blur - validate it on submit instead.
- Required marking - unlike a text field, there's no natural "on blur" moment for a checkbox, so check the required state on submit rather than as the user tabs past it.
- Validation timing - validate a required checkbox at submit, not on blur.
- Error message - put the message and required indicator right next to the checkbox's own label, "You must agree to the Terms of Service to continue," not a separate banner far from the control.
- Checkbox lists - for a list of selectable items, "required" more often means at least one must be checked - validate that at the group/fieldset level, not per checkbox.
Component Guide
Overview
Checkbox is a tri-state control (unchecked, checked, indeterminate) for choices where more than one option can be active at once, or for a single explicit agreement toggle - unlike Radio, which enforces exactly one choice from a set.
When to Use
- An explicit agreement toggle - accepting terms and conditions.
- Selecting multiple items from a list - picking several rows in a table, several tags in a filter.
- A settings page's list of independent toggles - each one on or off without affecting the others.
When Not to Use
- Exactly one choice from a small, fully visible set - use Radio so only one option can ever be selected.
- An immediate, standalone on/off setting outside a form - use Switch - it applies instantly with no submit step.
- A value chosen from a very large list - use a multi-select Select variant or Transfer instead of dozens of checkboxes.
Best Practices
- Always show a visible label next to the box - never the checkbox alone with no text.
- Use the indeterminate state for a "select all" checkbox that reflects a partial child selection.
- Group related checkboxes visually, with a shared heading or fieldset, so the set of options reads as one question.
Do and Don't
Do
A label that states what checking it actually does, so the choice is clear without reading anything else.
Don't
A double negative makes the user solve a logic puzzle to work out what checking the box means.
Accessibility
- Uses real native checkbox semantics - checked and indeterminate are reflected in the accessibility tree, not just visually.
- The label is clickable and programmatically linked to its input.
- Indeterminate is set via the DOM property (not CSS alone) so assistive technology announces the partial-selection state correctly.
Related Components
Radio, Switch, Transfer (bulk multi-select across two panels), Group Button.
{
"component": "Checkbox",
"category": "Forms",
"summary": "Checkbox is a tri-state control (unchecked, checked, indeterminate) for choices where more than one option can be active at once, or for a single explicit agreement toggle - unlike Radio, which enforces exactly one choice from a set.",
"whenToUse": [
"An explicit agreement toggle - accepting terms and conditions.",
"Selecting multiple items from a list - picking several rows in a table, several tags in a filter.",
"A settings page's list of independent toggles - each one on or off without affecting the others."
],
"whenNotToUse": [
"Exactly one choice from a small, fully visible set - use Radio so only one option can ever be selected.",
"An immediate, standalone on/off setting outside a form - use Switch - it applies instantly with no submit step.",
"A value chosen from a very large list - use a multi-select Select variant or Transfer instead of dozens of checkboxes."
],
"bestPractices": [
"Always show a visible label next to the box - never the checkbox alone with no text.",
"Use the indeterminate state for a \"select all\" checkbox that reflects a partial child selection.",
"Group related checkboxes visually, with a shared heading or fieldset, so the set of options reads as one question."
],
"doAndDont": {
"do": "A label that states what checking it actually does, so the choice is clear without reading anything else.",
"dont": "A double negative makes the user solve a logic puzzle to work out what checking the box means."
},
"accessibility": [
"Uses real native checkbox semantics - checked and indeterminate are reflected in the accessibility tree, not just visually.",
"The label is clickable and programmatically linked to its input.",
"Indeterminate is set via the DOM property (not CSS alone) so assistive technology announces the partial-selection state correctly."
],
"relatedComponents": [
"Radio",
"Switch",
"Transfer",
"Group Button"
]
}