Component Radio Button Group
This component is used to put multiple radio buttons in a form. The component adds the label, the help message, and the error state. It's used with the radio button component.
Example
Props
Attr | Type | Default | Docs |
---|---|---|---|
error | string | null | This property can be used to set an error. If a non-empty string is given, it will be used as the error message. |
help | string | '' | This property can be used to set a help text. |
hide-label | boolean | false | This property will visually hide the label. A label is still required to be provided for screenreader support. |
inline | boolean | false | This boolean sets whether the form field group should display the checkboxes inline or not. |
label | string | '' | This property can be used to set the inline label. |
label-class | string | '' | This property is a list of CSS classes that can be used to style the label. |
required | boolean | false | This boolean sets whether the form field group is required or not. |
required-ind | "none" | "optional" | "required" | This property is used to override the required indicator. By default, forms elements will show an | |
tooltip | string | null | This property is used to set the tooltip text. |
value | string | null | This property is the radio button value sent on submit when used in a form. |
Events
Event | Detail | Docs |
---|---|---|
somChange | any | This event is emitted when the radio button is toggled. |
Slots
Name | Docs |
---|---|
label | Label for the radio button group. Alternatively, you can use the label attribute. |
Anatomy

- Group label: Identifies the radio button group.
- Radio button: A single option in a radio button group.
- Radio button input: Shows the radio button’s selection status.
- Radio button label: Text describing the radio button value.
- Helper text: Provides additional context if needed.
- Radio button group: A collection of radio buttons as options in a field.
Labels
- Each field needs a clear and short label.
- Labels don’t require punctuation at the end.
- If used, punctuation should be consistent across all labels.
- Labels should use sentence style capitalization.
- Labels don’t need to be complete sentences.


Helper and error text
- Use helper text to clarify requirements for making selections.
- Use error text to explain user mistakes. Error text should be specific enough to correct errors.
- Use sentence case, write full sentences, and use punctuation.
- Helper text will appear underneath a field, except when an error message replaces it.

The leftmost radio button group has helper text that helps the user complete the field. The rightmost radio button group has error text to help correct an error.
Required and optional
Establish whether a radio button group needs to have a selection made or not by marking them accordingly. Optional radio button groups are marked “(optional)” after the group label, and required radio button groups have a red asterisk after the group label.
By default, fields not marked as required will show optional indicators. To display indicators for required fields instead, you can manually override this behavior by passing the props as shown in the code section.

Radio button groups that are required will have a red asterisk at the end of their group label. Ones that aren’t will have (optional) at the end of their group label.
Tooltips
You can add a tooltip to a radio button group label by setting the tooltip
attribute to the desired text. Note that individual radio buttons cannot have tooltips.
Use tooltips sparingly, and keep text brief and supplementary. Do not include interactive elements. The tooltip appears on hover or keyboard focus.
How to use
Radio buttons allow users to make a selection from a list of options. Once selected, a radio button cannot be deselected without choosing another option. Use a radio button group if:
- Users may only make a single selection.
- The list of options is short enough to be displayed at once.
- It's important for users to see all options at once.
Radio button or checkbox?
Checkboxes are visually similar to radio buttons but have different uses. Use a checkbox or checkbox group instead if:
- Users can make more than one selection.
- Users should be able to uncheck a selection.
- Users are acknowledging or affirming a statement.


Radio button group or select?
Like radio button groups, selects allow users to make single selections from a list. Use a select instead if:
- There are more than five options to choose from.
- Displaying all options would take up too much space.
- It's not necessary for all options to always be visible.


Behavior
States
A radio button can be selected or unselected, unless it’s disabled. Depending on the state, the mouse pointer may shift to a different icon.

The selection states of a radio button.

Button states communicate the button’s status to the user.
- Default: The standard state of a radio button input control.
- Hover: When a user’s cursor moves over a radio button input control without clicking it.
- Active: When users press a radio button input control before releasing.
- Focus: When a user highlights a radio button input control with a keyboard.
- Disabled: An unavailable selection. Be sure that users aren’t confused as to why a radio button input control is disabled. If the user is likely to be confused, keep the radio button input control enabled and trigger a detailed error when it’s clicked, or the form is submitted.
Errors
Error messages appear when users fail to make a required selection. Real-time validation makes filling out forms easier and faster. If that can’t be implemented, validate the radio button group as soon as the user submits the form.

When a user makes an error, a red asterisk appears after the group label and error text appears below the radio button group.
Text wrapping
When a radio button’s label is too long for the available space, it will wrap to form another line. Avoid wrapping text too many lines.

Radio button labels wrap when there is not enough space.
Interactions
Mouse
Users can select an option when they click on the radio button or the label. When hovering over a disabled radio button, their cursor indicates that it is not selectable by transforming into the error icon.

The cursor changes when hovering over selectable and disabled radio buttons.
Keyboard focus
Users can work with arrow keys to cycle through the individual radio buttons. Unlike with checkbox groups, the Tab key cycles through the different radio button groups.

A radio button can be focused on with the arrow keys on the keyboard and checked with the Space key.
Layout
By default, radio button groups are arranged vertically. A horizontal variant is available, but should be used sparingly. Horizontal layouts can make it hard for users to connect each radio button with its label.

Radio button groups should be aligned vertically when possible.
Do you have an idea, or want to help us improve this page? Reach out to us via email.
DTMB-DG-Support@michigan.govNeed help? Visit our Support page to learn how to get assistance, troubleshoot issues, and connect with the team.