---
title: "Zoom in / out animated icon"
description: "Zoom in / out animated icon (Everyday controls). The magnifier zooms in. Light: the lying bar swings up to stand across the other, minus becomes plus, lands upright with a hit and a small rebound, and a beat later the lens swells, magnifying the plus, and settles. Strong: the bar winds back first, swings past upright and settles in the same fold add-remove uses, and the lens dips, then swells harder and settles in two beats. The handle never moves. The reverse lays the bar back down while the lens shrinks: zooming out."
canonical: https://generativeicons.com/icons/zoom-in-out/
---

# Zoom in / out animated icon

The magnifier zooms in. Light: the lying bar swings up to stand across the other, minus becomes plus, lands upright with a hit and a small rebound, and a beat later the lens swells, magnifying the plus, and settles. Strong: the bar winds back first, swings past upright and settles in the same fold add-remove uses, and the lens dips, then swells harder and settles in two beats. The handle never moves. The reverse lays the bar back down while the lens shrinks: zooming out.

- Id: `zoom-in-out`
- Category: Everyday controls
- Search terms: magnify, magnifier, enlarge, shrink, zoom level, pinch to zoom, scale view, ctrl plus, ctrl minus, closer look, unzoom, view size
- Two states: zoom-out to zoom-in, 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.com/assets/zoom-in-out.lottie (dotLottie, 6836 bytes, sha256 74969e6f75ba52f6ceec3ef1184fa391fbe5c26a5c850dd4229094f74687a92b)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add zoom-in-out
```

## React

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

export function ZoomInOutIcon() {
  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/zoom-in-out.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/zoom-in-out/ · https://generativeicons.com/api/icons/zoom-in-out
