Raw
1 import { ComponentExample } from "@/components/ComponentExample"
2 import { ComponentReference } from "@/components/ComponentReference"
3
4 export const metadata = {
5 title: `Icon Button`,
6 }
7
8 # {metadata.title}
9
10 A component that displays an icon in a button.
11
12 In this guide, you'll learn how to use the Icon Button component.
13
14 <ComponentExample name="icon-button-demo" />
15
16 ## Usage
17
18 ```tsx
19 import { IconButton } from "@medusajs/ui"
20 import { Plus } from "@medusajs/icons"
21 ```
22
23 ```tsx
24 <IconButton>
25 <Plus />
26 </IconButton>
27 ```
28
29 ---
30
31 ## API Reference
32
33 <ComponentReference mainComponent="IconButton" />
34
35 ---
36
37 ## Examples
38
39
40 ### Icon Button Variants
41
42 <ComponentExample name="icon-button-all-variants" />
43
44
45 ### Icon Button Sizes
46
47 <ComponentExample name="icon-button-all-sizes" />
48
49 ### Icon Button Loading State
50
51 <ComponentExample name="icon-button-loading" />
52
53 ### Disabled Icon Button
54
55 <ComponentExample name="icon-button-disabled" hideFeedback />