Selection Controls
Selection Controls allow users to complete tasks that involve making choices, or switching settings on or off.
Selection controls are found on screens that ask users to make decisions or declare preferences such as settings or dialogs.
Three types of selection controls are covered in this section:
- Radio Buttons allow the selection of a single option from a set.
- Checkboxes allow the selection of multiple options from a set.
- Switches allow a selection to be turned on or off.
Accessibility
All form controls should have a label to identify it, this includes radio buttons, checkboxes, and switches. In most cases, this is done by using the <label>
 element (FormControlLabel).
When a label can't be used, it's necessary to add an attribute directly to the input component. In this case, you can apply the additional attribute (e.g. aria-label
, aria-labelledby
, title
) via the inputProps
 property.
Radio Buttons
Radio buttons allow the user to select one option from a set. Use radio buttons when the user needs to see all available options. If available options can be collapsed, consider using a drop-down menu because it uses less space.
Radio buttons should have the most commonly used option selected by default.
RadioGroup
 is a helpful wrapper used to group Radio
 components that provides an easier API, and proper keyboard accessibility to the group.
Checkboxes
Checkboxes give users the ability to input a choice between options and may be used:
- When the setting applied by the user should be confirmed and reviewed before the selection is applied.
- When multiple options are available and one or more options can be selected.
- To provide a better experience when selecting related items from a list.
- To give a clear distinction between the selected and unselected states.
- When there is a list of related items to select from.
- A single yes/no choice is provided.
Checkboxes with FormGroup
FormGroup is a helpful wrapper used to group selection controls components that provides an easier API.
Switches
Switches give users the ability to input a choice between states and may be used when:
- There is no need for further action to apply the selection choice.
- If a user is toggling between independent selections.
- A setting requires an on/off or show/hide function to display the results.
- Selections do not need a review or confirmation.
The option that the switch controls, as well as the state it’s in, should be made clear from the corresponding inline label, added via the FormControlLabel
 component.
Switches with FormGroup
FormGroup
is a helpful wrapper used to group selection controls components that provides an easier API. However, we encourage you to use a Checkbox instead.