---
title: "Warning animated icon"
description: "Warning animated icon (Feedback & status). The alarm goes off. Light: the exclamation stem is struck down from the top and stops dead above its dot; the strike buzzes the whole sign in a quick decaying side-to-side shake while two alarm flashes draw out beside the apex and fade. Strong: a harder strike, a wider and longer buzz, and the flashes go off twice. The sign stays rigid."
canonical: https://generativeicons.com/icons/warning/
---

# Warning animated icon

The alarm goes off. Light: the exclamation stem is struck down from the top and stops dead above its dot; the strike buzzes the whole sign in a quick decaying side-to-side shake while two alarm flashes draw out beside the apex and fade. Strong: a harder strike, a wider and longer buzz, and the flashes go off twice. The sign stays rigid.

- Id: `warning`
- Category: Feedback & status
- Search terms: caution, danger, attention, hazard, alert, risk, exclamation triangle, beware, careful, heads up
- 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/warning.lottie (dotLottie, 4252 bytes, sha256 fd24f6c3386cb1d69b8cceda91498e98a77758ee7ca39ebb0cfbade2b16c407f)
- License: MIT

## Install

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

## React

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

export function WarningIcon() {
  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/warning.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/warning/ · https://generativeicons.com/api/icons/warning
