Radio Group
A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.
Installation
npx shadcn@latest add https://exawizards.com/exabase/design/registry/radio-group.json
Usage
import { Field } from "@/components/ui/field"
import { Label } from "@/components/ui/label"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
<RadioGroup defaultValue="option-one">
<Field>
<RadioGroupItem value="option-one" id="option-one" />
<Label htmlFor="option-one">Option One</Label>
</Field>
<Field>
<RadioGroupItem value="option-two" id="option-two" />
<Label htmlFor="option-two">Option Two</Label>
</Field>
</RadioGroup>
API
See the Radio Group – Radix Primitives (opens in a new tab) documentation.