Checkbox

A checkbox is an input control that allows users to select a single item or multiple items from a list.

Usage

Checkboxes allow users to choose 1 or more items from a list of options.

Example of a form question with mutliple checkbox options stacked vertically.

You can also use a single checkbox to allow a user to enable or disable a feature or setting, along with a save button.

Example of a single checkbox for a common "Remember me" option.

When to use

  • Use checkboxes if you’re presenting 5 or fewer options to the user. If you’re presenting more than 5 options, use a select list instead.
  • Use checkboxes if the user can select multiple options. If the user can only select 1 option, then use radio buttons.

Labeling and alignment

Checkbox labels fall to the right of the checkbox control. If placed vertically, all checkbox controls should be aligned with the left edge of other controls or input fields, in the form or on the page.

You should provide a visible label to a group of checkboxes. The placement of the label will depend on the layout of other content in the form or on the page you’re designing. For more information on how to arrange checkboxes, see our forms documentation.

Example of a group of checkboxes with a label for the group.

You also have the option to use progressive disclosure by nesting other controls underneath a checkbox. The nested options would be shown or hidden when the user selects or deselects a checkbox.

Example of nested control checkboxes.

When to use switches vs. checkboxes

The main difference between a switch and a checkbox is that a switch changes an option and saves it simultaneously, while checkboxes require a separate action such as pressing a “Submit” or “Save” button to save the selection.

  • Use checkboxes when the options do not save automatically and require the user to perform an additional action to save changes (in this case, pressing the “Save changes” button).

    Example 1 of do's and don'ts for using a checkbox or a switch.
  • Use a switch for situations where you are turning a series of one or more independent options on or off.

    Example 2 of do's and don'ts for using a checkbox or a switch. On the left is the "do" example, a group of switches that correspond to various toggleable options like "Airplane mode", "Bluetooth", "Wi-fi", and "Cellular". On the right is the "don't" example, a group of checkboxes with the same options.
  • Use checkboxes when you may have an indeterminate state where you can select all, none, or some actions.

    Example 3 of do's and don'ts for using a checkbox or a switch. On the left is the "do" example, a group of nested checkboxes where the parent checkbox can have a "mixed" state where some of its children are checked and some unchecked. On the right is the "don't" example, a group of switches with the same nested behavior.

Accessibility

For information regarding accessibility, visit the checkbox accessibility tab.