Radio
Provides single user input from a selection of options.
General
Group
A group of radio components.
Type
Differentiate states by color.
Description
Description
can be combined with other components.
Disabled
Disable all radios.
Row
Horizontal arrangement.
APIs
Radio.Props
Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
checked | selected or not (in single) | boolean | - | false |
value | unique ident value (in group) | string | - | - |
id | native attr | string | - | - |
disabled | disable current radio | boolean | - | false |
type | current type | RadioTypes | RadioTypes | default |
onChange | change event | (e: RadioEvent) => void | - | - |
ref | forwardRef | Ref<HTMLInputElement | null> | - | - |
... | native props | InputHTMLAttributes | 'id', 'className', ... | - |
Radio.Group.Props
Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
initialValue | initial value | string | - | - |
value | selected child radio | string | - | - |
useRow | horizontal layout | boolean | - | false |
disabled | disable all radios | boolean | - | false |
onChange | change event | (value: string) => void | - | - |
... | native props | HTMLAttributes | 'id', 'className', ... | - |
Radio.Description.Props
[alias: Radio.Desc
]
Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
... | native props | HTMLAttributes | 'id', 'className', ... | - |
RadioTypes
type RadioTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error'
Contributors