Getting Started
Foundations
Components
#Installation
npx @dinachi/cli@latest add radio#Usage
tsx
import { Radio, RadioGroup } from "@/components/ui/radio"#Examples
Default Radio
A basic radio group with preset options
Controlled Radio
Radio group with controlled state and value display
Selected: email
Disabled Radio
Radio group in disabled state
#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) => void | — | Callback fired when the selected value changes. |
| Radio.disabled | boolean | false | Disables a radio option. |
| Radio.required | boolean | false | Marks a radio option as required. |