Checkbox is used for multiple choice selection. They are independent of each other in a list, and therefore, different from RadioButton, one selection does not affect other checkboxes in the same list.
- In a list, form or a Table, to present users with multiple, related options where more than one option can be selected. Users must be able to select all, none or some of the presented options.
- In a Form, along with a TextField, or other spaces that are too small for a Switch
- When selection doesn’t take immediate effect and requires form submission
- Situations where users can only choose one out of multiple, related options. Use RadioGroup instead.
- When a selection takes immediate effect, especially on mobile. Use Switch instead.
- When visually, it’s hard to tell that a checkbox turns something on or off. Use Switch instead.
Use checkboxes for multi-selection of related list items
Use a single Checkbox in forms where the selection only takes effect after submitting the form
Keep labels and legends clear and brief to avoid too many lines of text that are hard to scan and slow the user down. If clarification is needed, use info Tooltips or helperText.
Use lengthy text that truncates and doesn’t offer clear instructions for what you are expected to select
Use Checkbox at the start of a table row to make it clear which rows are multi-selectable
Use numerous checkboxes in table rows that make it hard to tell what items apply to multi-select actions
Use vertical alignment of multi-line labels so that the first line is vertically centered with the checkbox input
Vertically center checkbox inputs with their respective custom labels
Checkboxes should have labels that can be read by screen readers, and that can be clicked or tapped to make it easier for users to select and deselect options. Therefore, make sure to supply the
label prop. If that’s not possible, make sure your standalone Label has an
htmlFor prop that matches the
id of the checkbox. Test that a checkbox and label are properly connected by clicking or tapping on the label and confirming that it activates the checkbox next to it.
If Checkbox is labeled by content elsewhere on the page, or a more complex label is needed, the
labelDisplay prop can be used to visually hide the label. In this case, it is still available to screen reader users, but will not appear visually on the screen. See the Label visibility example for more detail.
All groups of related Checkboxes should have a legend, which is provided by wrapping them in Fieldset component.
Checkbox has conventional keyboard support.
- Users relying on the keyboard expect to move focus to each Checkbox by using the tab key or shift+tab when moving backwards
disabledwill prevent Checkbox from receiving keyboard focus or input
In order to ensure proper tab order, wrap a group of related Checkboxes in Fieldset.
Checkbox’s error state displays an error-themed color border. Checkbox must always show an error message to indicate error status to ensure color is not the only indicator of status or information. Use
errorMessage prop to display the appropriate error message that helps the user resolve the problem. Error messages should be clear, direct and conversational. For an example, see Writing.
Be sure to localize
label and any
helperText. Be mindful of label length so that it doesn’t truncate in languages with lengthier character counts.
size="sm" (16px) and
Checkbox has unchecked, checked, error, indeterminate and disabled states.
Indeterminate is a state that is neither checked nor unchecked — e.g. a "Select all" checkbox when not all items are selected or unselected. Indeterminism is purely presentational - the value of a checkbox and its indeterminism are independent.
Checkbox supports helperText
Checkbox supports images. When including images, you can use the helperText property to clearly describe the information being presented by the image, or use the image's alt text to provide more context.
Spacing is already accounted for; simply specify the width and height.
In some cases, the label for a Checkbox is represented in a different way visually, as demonstrated below. In these instances, you can set
labelDisplay="hidden" to ensure Checkbox is properly labeled for screen readers while using a different element to represent the label visually.
- Be clear and brief with checkbox labels so they are easily scanned
- Include lengthy text labels that make it hard for a user to scan a list of choices
Component quality checklist
Component is live in Figma, however may not be available for all platforms.
Component is available in code for web and mobile web.
Component is not currently available in code for iOS.
Component is slotted to be built for Android.
Use when presenting a user with a list of choices for which there can only be one selection.
Use for single-cell options that can be turned on or off. Examples include a list of settings that take effect immediately without having to confirm Form submission.