1 import { ComponentExample } from "@/components/ComponentExample"
2 import { ComponentReference } from "@/components/ComponentReference"
3
4 export const metadata = {
5 title: `Radio Group`,
6 }
7
8 # {metadata.title}
9
10 A component that renders a group of radio buttons using Medusa's design system.
11
12 In this guide, you'll learn how to use the Radio Group component.
13
14 <ComponentExample name="radio-group-demo" />
15
16 ## Usage
17
18 ```tsx
19 import { RadioGroup } from "@medusajs/ui"
20 ```
21
22 ```tsx
23 <RadioGroup>
24 <RadioGroup.Item value="1" id="radio_1" />
25 <RadioGroup.Item value="2" id="radio_2" />
26 <RadioGroup.Item value="3" id="radio_3" />
27 </RadioGroup>
28 ```
29
30 ---
31
32 ## API Reference
33
34 <ComponentReference mainComponent="RadioGroup" />
35
36 ---
37
38 ## Examples
39
40 ### Radio Group with Descriptions
41
42 <ComponentExample name="radio-group-descriptions" />
43
44 ### Controlled Radio Group
45
46 <ComponentExample name="radio-group-controlled" />
47
48 ### Radio Group with a Disabled Item
49
50 <ComponentExample name="radio-group-disabled" />
51
52 ---
53
54 ## Radio Choice Box
55
56 The `RadioGroup.ChoiceBox` component allows you to show a group of radio buttons, each in a box with a label and description.
57
58 <ComponentExample name="radio-group-choicebox" />
59
60 ### Choice Box API Reference
61
62 <ComponentReference mainComponent="RadioGroup" componentsToShow={[
63 "RadioGroup.ChoiceBox"
64 ]} hideFeedback />