forms
RadioGroup
Example
Import
import { RadioGroup } from '@connor-adams/designsystem'Usage
A single-choice radio group for mutually-exclusive options (account type, statement period). Exported as RadioGroup.
<RadioGroup
options={['Chequing', 'Savings', 'Credit']}
value={acctType}
onValueChange={setAcctType}
/>
Variants: orientation="horizontal" for inline rows, defaultValue (uncontrolled), disabled. Options accept { value, label } objects.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | RadioOption[] | [] | |
| value | string | undefined | — | |
| defaultValue | string | undefined | — | |
| onValueChange | ((value: string) => void) | undefined | — | |
| name | string | undefined | — | |
| orientation | "horizontal" | "vertical" | undefined | vertical | |
| disabled | boolean | undefined | — |