Skip to content

Checkbox

Checkboxes allow users to select one or more items from a list or toggle an option on or off. Changes made with checkboxes do not take effect immediately; the user needs to confirm the selection by performing an additional action, such as clicking a “Submit” button.

Anatomy

  1. Label: Indicates the purpose of the entire group of checkboxes. It provides an instruction or context for the available options.
  2. Description: Provides additional context/instructions about the checkbox. It helps users understand what is required or gives examples of the kind of information they should enter.
  3. Checkbox container: The checkbox selection control.
  4. Checkbox label: Indicates the purpose of each individual checkbox(es). It should clearly communicates the choice or option represented by that specific checkbox.

Usage Guidelines

Selection states

<Form>
<CheckBoxItem checkboxLabel="Unchecked" inputId="unchecked-checkbox" />
<CheckBoxItem
checkboxLabel="Checked"
inputId="checked-checkbox"
attributes={{ defaultChecked: true }}
/>
<CheckBoxItem
checkboxLabel="Indeterminate"
inputId="indeterminate-checkbox"
/>
</Form>;
Open in StoryBook

Checkboxes have three selection states: Unchecked, Checked, and Indeterminate. The indeterminate state is typically used to indicate a partially selected group of options or when some but not all sub-options are selected.

Notification preferences How would you like to be updated?
<Form>
<CheckBoxGroup
label="Notification preferences"
description="How would you like to be updated?"
>
<CheckBoxItem
checkboxLabel="Email notifications"
inputId="email-notification-checkbox"
attributes={{ defaultChecked: true }}
/>
<CheckBoxItem
checkboxLabel="SMS notifications"
inputId="sms-notification-checkbox"
/>
<CheckBoxItem
checkboxLabel="In-app notifications"
inputId="in-app-notification-checkbox"
/>
</CheckBoxGroup>
</Form>;
Open in StoryBook
  • When possible, group related checkboxes together and provide a clear heading or label to describe the group. This helps users quickly understand what the options are related to.
  • Avoid putting more than 7 checkboxes in one group.

Labels

Phrase the labels clearly so that no helper text is needed to clarify what will happen when you select the respective checkbox.

Provide clear and descriptive labels to aid users in understanding the purpose of each checkbox. Avoid using negative statements like ‘check to prevent X’. Instead, use positive, active statements that clearly describe what will happen when the checkbox is selected.

✅ Provide clear and descriptive labels
❌ Don’t use negative statements