RadioGroup
Manage one selected value across a labeled group of Radio controls.
RadioGroup manages one selected string value across its Radio children. Name the group with aria-label or aria-labelledby.
Import
import { RadioGroup } from "@solarius/onset";Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled selection. Matched against each Radio's value by equality. |
defaultValue | string | — | Initial uncontrolled selection. Defaults to an empty string with no selected option. |
onChange | (value: string) => void | — | Fires with the newly selected value. Re-clicking the selected radio does not fire it. |
inline | boolean | — | Lay radios out in a row instead of stacked. Descriptions still render under their labels, so inline suits short labels. |
children | ReactNode | — | Radio children. Context permits nested wrappers between radios and the group. |
className | string | — | Additional CSS class on the role="radiogroup" container. |