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.

Two 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.

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.

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.

Fieldsets, Legends, and Helper Text

When a fieldset with a legend is required, take note of the following classes to apply, and placement of the helper text for descriptions.

Error States

To display field in an error state, add .u-form-control--invalid to the .u-form-control element (in the example, placed on the fieldset), and .u-form-helpertext--invalid to the helper text element (if in use).

Note: Implementation of validation logic is up to the application.

Properties