Components
Radio Group
A grouped single-select control for plan pickers, settings panels, and compact choice lists.
Loading...
Installation
Install the registry item directly, then add any package dependencies if you are setting the component up manually.
1
Install the component
Run the registry command below to add radio-group to your project.
watermelon add radio-group2
Import the component
Import Radio Group from your local UI registry output.
Import
import { RadioGroup } from "@/components/ui/radio-group";Import
Import
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";Usage
Radio groups let the user choose exactly one option from a related set.
Loading...
API Reference
| prop | type | default | description |
|---|---|---|---|
| value | string | - | Controls the selected item in the group. |
| defaultValue | string | - | Sets the initial item for uncontrolled usage. |
| onValueChange | (value: string) => void | - | Called whenever the user picks a new item. |
| disabled | boolean | false | Disables interaction for the whole group or individual items. |