Anatomy
Image is not to scale for informative purposes only
- Radio container
- Border
- Filled container
Options
Variants
There are three variants primary
secondary
and cta
Options
isOutline
Default value
Radio buttons can be preselected or not depending on the situation.
Orientation
Radio groups can be either horizontal or vertical. By default, radio groups are vertical.
Behaviors
Disabled
Focus
Error
Text Overflow
Guidance
When error should be shown
Error should only occur if the options were not pre-selected and user tries to continue without selecting an option. Required radio groups should be indicated in the label with a * in the error token color. Suplementary error message should be shown below the group.
Required
When radio button selection is required it should be reflected in the fieldset label.
Avoid using radio buttons for a binary choice
The toggle or checkbox is most often used for settings and allows the user to choose between yes/no options or on/off.