Skip to main content
Official government website

Checkbox

Checkboxes let users select any number of options from a list, including none.

Examples
HTML and React
Group
Form elements
On this page

Preview

Checkbox group
Open in new tab

The Checkbox component lets users select any number of options from a list, including none, or toggle a single option on or off. Each checkbox operates independently, so selecting one does not affect the others.

Usage

When to use

  • Use checkboxes when users can select any number of options from a list.
  • Use one checkbox for a single optional choice, such as receiving updates.

When not to use

  • Do not use checkboxes when users must choose exactly one option; use radio buttons.
  • Do not use separate “Yes” and “No” checkboxes because both can be selected.

Best practices

Explain how many options users can choose

Add a hint such as “Select all that apply” when more than one selection is allowed. Group related choices in a fieldset with a clear legend.

Make every option easy to select

Place the checkbox before its label and connect them with matching id and for values so the whole label activates the control. Avoid long, overloaded groups; simplify or split the question when scanning becomes difficult.

Guidance

Group related checkboxes in a <fieldset> with a <legend> that frames the question, for example “How would you like to be contacted?”. This associates the options with their question for assistive technology.

Do not pre-select options. Pre-selected checkboxes make it more likely that users will not notice they have skipped a question, or will submit an answer they did not intend. Let users make an active choice.

Order options by relevance, listing the most common or recommended choices first. Fall back to alphabetical order only when no meaningful priority exists.

Make the number of selectable options clear. Do not assume users will infer from the visual difference between checkboxes and radio buttons that they can select more than one. Add a hint such as “Select all that apply” where it helps.

Per-option hints

Add a hint to an individual option when its label needs clarification. Link the hint to the checkbox with aria-describedby.

Checkbox with a per-option hint
Open in new tab

Single checkbox

Use a standalone checkbox, without a fieldset, for a single opt-in, such as accepting terms and conditions.

Single checkbox
Open in new tab

Conditional reveal

Show follow-up content when an option is ticked. The conditional block sits as a sibling of its checkbox item and appears only while that checkbox is checked.

Checkbox with conditional reveal
Open in new tab

Disabled checkboxes

Disable a checkbox only when an option is genuinely unavailable to the user, and say why in the label, for example “(unavailable)”. As with buttons, avoid disabling wherever possible: a disabled checkbox gives the user no information about what they need to do to enable it.

Disabled checkbox
Open in new tab