Radio Group
readyLabelled set of radio options, e.g. a Yes / No question.
The Radio Group presents a small set of mutually exclusive options under a label. The default options are Yes / No, as used for the record’s boolean questions.
Anatomy
- 1 Group label — the question; rendered as a legend
- 2 Required marker — red asterisk when an answer is mandatory
- 3 Radio control — one selectable circle per option
- 4 Option label — the choice text beside each control
Variants
Default (Yes / No)
<RadioGroup label="Veteran" name="veteran" /> Custom options
<RadioGroup label="Preferred contact" name="contact" options={["Email", "Phone", "Mail"]} value="Email" /> States
Unselected
No option chosen yet.
Selected
One option active.
Required
Shows the asterisk.
Usage
Use radios for 2–5 visible, mutually exclusive options.
Don't use radios for long lists — switch to a Select.
Accessibility
- All options share one
name, so they behave as a single keyboard-navigable group. - The group
labelis exposed as a legend describing the choice. - Required groups render a visual
*; pair it withrequired. - Arrow keys move selection within the group, as with native radios.
Content
- Phrase the label as the question or attribute (“Veteran”, “Preferred contact”).
- Keep option text short and parallel (“Email”, “Phone”, “Mail”).
- Order options logically; put the safest or most common choice first.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
label | string | — | Group label (legend). |
name | string | — | Shared radio name (required for grouping). |
options | string[] | ["Yes", "No"] | The choices. |
value | string | — | The initially selected option. |
required | boolean | false | Renders the red * marker. |
Related
- Select — for larger or space-constrained choice sets.
- Text Field — for free-form input.