Radio
Provides single user input from a selection of options.
Import
import { Radio } from 'raw-ui';
Default
Checked
With label
Controlled
Disabled
Group
API
Radio
| Prop | Description | Type | Default |
|---|
| defaultChecked | selected or not by default (uncontrolled) | boolean | false |
| checked | selected or not (controlled) | boolean | - |
| value | unique identification value (only in group) | string | number | - |
| disabled | disable current radio | boolean | false |
| onChange | change event handler | (event: React.ChangeEvent<HTMLInputElement>) => void | - |
| ... | native props | React.InputHTMLAttributes | - |
Radio.Group
| Prop | Description | Type | Default |
|---|
| defaultValue | default selected items (uncontrolled) | Array<string | number> | - |
| value | selected items (controlled) | Array<string | number> | - |
| disabled | disable all items | boolean | false |
| layout | vertical layout | 'row' | 'column' | 'row' |
| onChange | change event handler | (value: Array<string | number>) => void | - |
| ... | native props | React.HTMLAttributes | - |