---
title: "Snap to grid animated icon"
description: "Snap to grid animated icon (Drawing & design tools). Light: the square is dragged 2.2 units off the centre grid point and snaps back in 0.1 s while the point pulses. Strong: it is dragged farther, snaps back hard past the point and settles as the point pulses."
canonical: https://generativeicons.com/icons/snap-to-grid/
---

# Snap to grid animated icon

Light: the square is dragged 2.2 units off the centre grid point and snaps back in 0.1 s while the point pulses. Strong: it is dragged farther, snaps back hard past the point and settles as the point pulses.

- Id: `snap-to-grid`
- Category: Drawing & design tools
- Search terms: snapping, grid snapping, align to grid, snap points, pixel grid, pixel snapping, snap to point, layout grid, grid alignment
- 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/snap-to-grid.lottie (dotLottie, 5680 bytes, sha256 5693626c526777a560cb9e50bec5599d093f51b1b8a581b24f340707a49ac298)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add snap-to-grid
```

## React

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

export function SnapToGridIcon() {
  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/snap-to-grid.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/snap-to-grid/ · https://generativeicons.com/api/icons/snap-to-grid
