---
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" />
