Radio
A radio group component for selecting a single option from a list of options.
Usage
The Popover component provides a way to display rich content in a portal when triggered by a button. It supports accessibility features, positioning options, and customizable styling.
Radio Props
Radio.Root Props
Prop | Type | Default |
---|---|---|
defaultValue | string | - |
value | string | - |
onValueChange | (value: string) => void | - |
disabled | boolean | - |
name | string | - |
required | boolean | - |
orientation | "horizontal" | "vertical" | - |
dir | "ltr" | "rtl" | - |
ariaLabel | string | - |
Radio.Item Props
Prop | Type | Default |
---|---|---|
value | string | - |
disabled | boolean | - |
required | boolean | - |
id | string | - |
Examples
State
Radio buttons support different states to indicate interactivity and selection.
With Labels
Radio buttons should always be accompanied by labels for accessibility and usability.
Form Example
Radio buttons can be used in forms with proper validation and submission handling.