---
title: "Flash toggle animated icon"
description: "Flash toggle animated icon (Photos & camera). Off to on: three rays grow outward from the bolt's tip and stay. Strong: the bolt jolts and the rays shoot past their length before settling. Reverse pulls the rays back into the tip."
canonical: https://generativeicons.lottiefiles.com/icons/flash-toggle/
---

# Flash toggle animated icon

Off to on: three rays grow outward from the bolt's tip and stay. Strong: the bolt jolts and the rays shoot past their length before settling. Reverse pulls the rays back into the tip.

- Id: `flash-toggle`
- Category: Photos & camera
- Search terms: camera flash, flash on, flash off, auto flash, flash mode, lightning bolt, bolt, strobe
- Two states: off to on, played forward and back
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.lottiefiles.com/assets/flash-toggle.lottie (dotLottie, 16032 bytes, sha256 d564176223ead9089926f97921ee6e9297af58ea43c06fe15b425ec6e1969e2d)
- License: MIT

## Install

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

## React

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

export function FlashToggleIcon() {
  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/flash-toggle.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.lottiefiles.com/icons/flash-toggle/ · https://generativeicons.lottiefiles.com/api/icons/flash-toggle
