# Close Button

A button to close or dismiss a component, such as a modal or alert.

## Overview

```tsx
import { CloseButton } from 'welcome-ui/CloseButton'

const Example = () => {
  return <CloseButton />
}

export default Example
```

## Examples

### Animate Presence

```tsx
import { useState } from 'react'

import { Button } from 'welcome-ui/Button'
import { CloseButton } from 'welcome-ui/CloseButton'

const Example = () => {
  const [isVisible, setIsVisible] = useState(false)
  return (
    <>
      <Button onClick={() => setIsVisible(!isVisible)} variant="primary">
        Toggle
      </Button>
      {isVisible ? <CloseButton animatePresence /> : null}
    </>
  )
}

export default Example
```

## Props

### CloseButton

```tsx
interface CloseButtonProps {
  /** Default: false */
  animatePresence?: boolean
  isLoading?: boolean
  size?: 'lg' | 'md' | 'sm'
  variant?: 'primary' | 'primary-ai' | 'primary-danger' | 'primary-neutral' | 'secondary' | 'secondary-danger' | 'tertiary' | 'tertiary-danger'
}
```