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.
A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.
import { RadioGroup, Radio } from "@/components/ui/radio-group";<RadioGroup defaultValue="react-query">
<div className="text-sm font-medium">
Choose your favorite Tanstack library
</div>
<Label>
<Radio value="react-query" /> React Query
</Label>
<Label>
<Radio value="tanstack-router" /> Tanstack Router
</Label>
<Label>
<Radio value="tanstack-table" /> Tanstack Table
</Label>
</RadioGroup>You can change the orientation of the radio group to horizontal or vertical by passing the orientation prop to the RadioGroup component.
You can control the value of the radio group by passing the value prop to the RadioGroup component and using the onValueChange callback to update the value.
Choose your preferred AI model