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