File size: 760 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 |
---
title: Close Button
description: Used to trigger close functionality
links:
storybook: components-close-button--basic
recipe: close-button
---
<ExampleTabs name="close-button-basic" />
## Usage
```jsx
import { CloseButton } from "@chakra-ui/react"
```
```jsx
<CloseButton />
```
## Examples
### Sizes
Use the `size` prop to change the size of the close button.
<ExampleTabs name="close-button-with-sizes" />
### Variants
Use the `variant` prop to change the appearance of the close button.
<ExampleTabs name="close-button-with-variants" />
### Custom Icon
Pass the custom icon to the `children` of the `CloseButton` component.
<ExampleTabs name="close-button-with-custom-icon" />
## Props
<PropTable component="Button" part="Button" />
|