Radio Group
A group of radio buttons that lets you pick only one option at a time.
Installation
npx shadcn@latest add https://scrollxui.dev/registry/radio-group.json Usage
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"<RadioGroup defaultValue="option-one">
<div className="flex items-center space-x-2">
<RadioGroupItem value="option-one" id="option-one" />
<Label htmlFor="option-one">Option One</Label>
</div>
<div className="flex items-center space-x-2">
<RadioGroupItem value="option-two" id="option-two" />
<Label htmlFor="option-two">Option Two</Label>
</div>
</RadioGroup>API Reference
Radio Group
A group of radio buttons that lets you pick only one option at a time.