File size: 934 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: Icon Button
description: Used to render an icon within a button
links:
  source: components/button
  storybook: components-icon-button--basic
  recipe: button
---

<ExampleTabs name="icon-button-basic" />

## Usage

```jsx
import { IconButton } from "@chakra-ui/react"
```

```jsx
<IconButton aria-label="Search database">
  <LuSearch />
</IconButton>
```

## Examples

### Sizes

Use the `size` prop to change the size of the button.

<ExampleTabs name="icon-button-with-sizes" />

### Variants

Use the `variant` prop to change its visual style

<ExampleTabs name="icon-button-with-variants" />

### Color

Use the `colorPalette` prop to change the color of the button

<ExampleTabs name="icon-button-with-colors" />

### Rounded

Set `rounded="full"` to make the button fully rounded

<ExampleTabs name="icon-button-rounded" />

## Props

<PropTable component="Button" part="Button" omit={["loading", "loadingText"]} />