npx gluestack-ui add radioimport { Radio } from '@/components/ui/radio';


export default () => (
<RadioGroup>
<Radio>
<RadioIndicator>
<RadioIcon />
</RadioIndicator>
<RadioLabel />
</Radio>
</RadioGroup>
);
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The value to be used in the radio input. This is the value that will be returned on form submission. |
onChange | function | - | Function called when the state of the radio changes. |
isDisabled | bool | false | To manually set disable to the radio. |
isInvalid | bool | false | To manually set invalid to the radio. |
isHovered | bool | false | To manually set hover to the radio. |
isFocusVisible | bool | false | To manually set focus visible state to the radio. |
isIndeterminate | bool | false | To manually set indeterminate to the radio. |
| Prop | Type | Default | Description |
|---|---|---|---|
forceMount | boolean | false | Forces mounting when more control is needed, useful for animations with React libraries. |
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The value of the radio group. |
onChange | function | - | The callback fired when any children Radio is checked or unchecked. |
isReadOnly | bool | false | To manually set read-only to the radio group. |
| State | Data Attribute | Values |
|---|---|---|
hover | data-hover | true | false |
active | data-active | true | false |
disabled | data-disabled | true | false |
focusVisible | data-focus-visible | true | false |
invalid | data-invalid | true | false |