---
title: "Close animated icon"
description: "Close animated icon (Everyday controls). The X strikes itself out. Light: both strokes vanish, the first slashes back on from top-left, the second follows 80 ms later from top-right, and the finished X pops once and settles. Strong: the X slashes on while turning into place, lands with a hit and pops harder with a rebound."
canonical: https://generativeicons.com/icons/close/
---

# Close animated icon

The X strikes itself out. Light: both strokes vanish, the first slashes back on from top-left, the second follows 80 ms later from top-right, and the finished X pops once and settles. Strong: the X slashes on while turning into place, lands with a hit and pops harder with a rebound.

- Id: `close`
- Category: Everyday controls
- Search terms: x, x mark, cross, dismiss, cancel, exit, quit, close window, close tab, close dialog, shut
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/close.lottie (dotLottie, 3024 bytes, sha256 7b02618df7fe382efeab75bfcace415f5d1d3c780b38202993c310aae47880a2)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add close
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/close.mjs';

export function CloseIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/close.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/close/ · https://generativeicons.com/api/icons/close
