ComponentsRadio Group
Radio Group
Lets a user choose exactly one value from a clearly labelled group of options.
Installation
bunx @swift-rust/ui add radio-group
Usage
tsx
1import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";23<RadioGroup defaultValue="comfortable">4<RadioGroupItem value="compact" label="Compact" />5<RadioGroupItem value="comfortable" label="Comfortable" />6</RadioGroup>
Composition
Radio Group is composed of these parts:
RadioGroup├── RadioGroupItem└── RadioGroupItem