
Anatomy
The Radio uses two primary elements to help users select one option from a set of choices, the radio itself, and its corresponding label.
- Radio button
- Label
Options
Configure the Radio to accommodate the following scenarios:States
Default
Disabled
Description
Descriptions provide information to help the user avoid errors.Behavior
The Radio uses standard form control behaviors.Usage Guidelines
Content
Radio content should clearly communicate options and provide context for informed decisions.The Radio Group’s title and description communicate its main purpose
Titles should clearly communicate the Radio Group’s purpose at a glance. Descriptions provide additional context about the decision users need to make.Do
Don’t
Use descriptive Radio input labels
Users rely on labels to understand what each Radio input controls. Use positive, active wording for Radio input labels. Use sentence case (capitalize only the first word and proper nouns) so control labels are easy to scan. Do not use periods for short phrases or single sentences. “Leaky bathroom faucet""Clogged kitchen drain"
"No hot water"
"Slow shower drain"
"Overflowing toilet”
Do
"Plumbing emergency"
"Water not working"
"Broken pipe"
"Plumbing issue”
Don’t
Give users the information they need to make an informed decision
When a label doesn’t provide enough context, use descriptions to give users the relevant details they need to decide. Don’t add descriptions when unneeded or solely to match other inputs. Use sentence case, and only include period if more than one sentence is used. Follow the inline help content guidelines.Do
Don’t
Keyboard Interaction
Navigate the Radio using standard keyboard controls.Accessibility
- Include Radio buttons in a Radio Group with multiple mutually exclusive options.
- Provide a visible label for each Radio button.
- When a Radio button has an error, include helper text to describe the error.
Code
- Implementation
- Radio Props
- Radio.Group Props
Common Examples
Basic radio input
TheRadio component accepts many of the same props as an HTML input with type="radio", such as name, value, checked, and defaultChecked.Controlling radio state
Use thechecked and onClick props to manually control the state of a radio.Using radio groups
TheRadio.Group component acts as a wrapper around a collection of Radio components.React Accessibility
- The
Radiocomponent’slabelprop allows for anyReactElementto be passed in, but thelabelshould always be populated with some text content that is screen-reader accessible.
Markdown in legends
TheRadio.Group legend prop supports inline markdown: bold (**text**), italic (*text*), bold and italic (***text***), highlight (==text==), and code (`text`).Hide the legend
UsehideLabel on Radio.Group to visually hide the legend. The legend string is kept as a screen-reader-only <legend> element so the group remains accessible — any inline markdown is stripped to plain text.