A set of radio buttons for selecting a single option from a list.
import { Radio, RadioGroup } from '@ontoui/react';
<RadioGroup defaultValue="ssd">
| Part | Description |
|---|
RadioGroup | The root container that manages shared selection state. |
Radio | An individual radio button. Must be placed inside RadioGroup. |
Disable all options by setting disabled on RadioGroup.
<RadioGroup defaultValue="ssd" disabled>
| Prop | Type | Default |
children? | ReactNode | — |
id? | string | — |
className? | string | — |
name? | string | — |
value? | string | — |
defaultValue? | string | — |
disabled? | boolean | — |
readOnly? | boolean | — |
required? | boolean | — |
onValueChange? | (value: unknown, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element; }) => void | — |
ref? | Ref<HTMLDivElement> | — |
| Prop | Type | Default |
id? | string | — |
className? | string | — |
value | string | — |
disabled? | boolean | — |
readOnly? | boolean | — |
required? | boolean | — |
nativeButton? | boolean | — |
ref? | Ref<HTMLSpanElement> | — |