apps/design-system/content/docs/components/radio-group.mdx
npx shadcn-ui@latest add radio-group
<Step>Install the following dependencies:</Step>
npm install @radix-ui/react-radio-group
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="radio-group" /><Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </Tabs>import { Label } from '@/components/ui/label'
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>