Getting Started
Foundations
Integrations
Components
#Installation
npx @dinachi/cli@latest add radio#Usage
tsx
import { Radio, RadioGroup, RadioIndicator } from "@/components/ui/radio"#Examples
#API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| RadioGroup.value | string | — | The controlled selected radio value. |
| RadioGroup.defaultValue | string | — | The initially selected value when uncontrolled. |
| RadioGroup.onValueChange | (value: string, event: Event) => void | — | Callback fired when the selected value changes. |
| RadioGroup.name | string | — | Identifies the field when a form is submitted. |
| RadioGroup.disabled | boolean | false | Disables all radio options in the group. |
| RadioGroup.readOnly | boolean | false | Prevents the user from selecting a different radio. |
| RadioGroup.required | boolean | false | Requires a value before submitting a form. |
| Radio.value | string | — | The unique identifying value of the radio in a group. |
| Radio.disabled | boolean | false | Disables a radio option. |
| RadioIndicator.keepMounted | boolean | false | Keeps the indicator in the DOM when the radio is inactive. |