Checkbox - Usage ​
Guidelines ​
Use Checkbox when ​
- toggling an option on/off.
- selecting multiple values from several options.
- a collection of options share context.
Avoid Checkbox when ​
- you need to restrict selection to a single option. Use a Radio button, Switch or Select instead.
- a checkbox requires a submission step (e.g., clicking "Save" or "Submit"), instead use Switch to trigger immediate state change (no save required).
Options ​
Selection states ​
Label ​
Error ​
Disabled ​
Checkbox group ​
Behaviour ​
Interactive label ​
Keyboard focus ​
Text overflow ​
Checkbox or radio? ​
Checkboxes and radio buttons are not interchangeable. A set of checkboxes should be used to select as many options as desired (or none).
A set of radio buttons should be used to select only a single option from a list of mutually exclusive options.
Label groups of related checkboxes ​
Always have a clear label that describes what the list of options represents and guides users what to do. This is important for accessibility, since a screen reader will read the label before each option.
Don’t make the user have to guess or assume what the information means.
Representing mixed values ​
When a checkbox presents multiple values that are not identical, the checkbox should appear as indeterminate. Any subsequent click or tap should select the checkbox, and update all values. Another click or tap after that should deselect the checkbox, and update all values to be not selected.
Don’t forget to make sure that nested checkbox lists have a connection between the parent checkbox and the child options.
Questions? ​
Feel free to ask any questions on usage in the Warp DS Slack channel: #warp-design-system