Checkbox
About
A Checkbox allows users to select one or more options out of one or a group of checkboxes. A Checkbox can live on its own or in a checkbox group.
Anatomy
A Checkbox consists of a:
- Border
- Select indicator
- Label
When to use a Checkbox
Checkboxes should be used if users can select at least one but possible more from up to seven options that are similar to each other. The advantage of showing a checkbox group is that users see all options in one glance without extra clicks, which allows for easy comparison.
When not to use Checkboxes
- When users should be able to select just one option. Instead, use a group of Radio buttons.
- When the options consist of 7 options or more. Instead, use a Select field with Dropdown.
Behaviour
States
A Checkbox comes with the following states:
- Enabled
- Hovered
- Focused
- Disabled
- Error
Default
A default selection is preferred, especially when we know the (preferred) choice(s) of the majority of the users.
- This will reduce interactions and therefore speed up the process.
- This can guide users to choose an option or several options.
- If we do this consistently, they know that they can expect default selections for all radio button groups (e.g., in a form).
In other cases, give the control to users and don’t force them into a decision.
Keyboard behaviour
- Users are able to navigate through the options by the Up- and Down arrow keys.
- Users are able to select a radio button using the Enter key.
Content
Position Checkboxes below each other, in a vertical matter, for easy comparison.
Write concise Checbkox labels, preferably consisting of one or a few words and written in a consistent manner to promote comparability.
When you use multiple checkbox groups (e.g.. in forms) you might consider a label for each group.
Use a singular checkbox if users should answer a “Yes/No”, “On/Off”, “True/False”, or “Agree/Disagree” question and will need to confirm their answer.
Resources
Events
Component | Event | Description | Details |
---|---|---|---|
<r-checkbox /> | rChange | Emitted when checked state changes via user interaction. |
|
rReset | Occurs when a form is reset (resets component’s checked state to initial). |