# Edit animated icon

> Edit animated icon with a hover interaction for React and shadcn/ui. Download the Lottie JSON or SVG, free under MIT.

Edit is a 2 s micro animation from the action set that plays on hover and reverses on mouse leave, like Edit 2 and Edit 3. Its static SVGs cover the edit-2 and edit states, so the resting icon still shows which one is active. Also known as pencil, write and rename.

## Facts

- Interaction: [Hover](https://useanimations.com/interactions/hover). Plays forward on mouseenter and backward on mouseleave.
- Category: [Action](https://useanimations.com/categories/action)
- Duration: 2.00 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 2.3 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

- Lottie JSON: https://useanimations.com/icons/edit.json
- Static SVG (edit-2): https://useanimations.com/icons/edit/edit-2.svg
- Static SVG (edit): https://useanimations.com/icons/edit/edit.svg
- ZIP (Lottie JSON and SVGs): https://useanimations.com/icons/edit.zip
- shadcn registry item: https://useanimations.com/r/edit.json
- Web page: https://useanimations.com/icons/edit

## React

```bash
npm install react-useanimations
```

```jsx
import UseAnimations from 'react-useanimations';
import edit from 'react-useanimations/lib/edit';

<UseAnimations animation={edit} size={32} />
```

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/edit.json
```

```tsx
import { AnimatedEdit } from '@/components/animations/edit';

<AnimatedEdit size={24} />
```

## HTML and lottie-web

```html
<div id="edit-icon" style="width: 48px; height: 48px"></div>

<script src="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js"></script>
<script>
  const el = document.getElementById('edit-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/edit.json' });
  el.addEventListener('mouseenter', () => { a.setDirection(1); a.play(); });
  el.addEventListener('mouseleave', () => { a.setDirection(-1); a.play(); });
</script>
```

## Other versions

- [Edit 2](https://useanimations.com/icons/edit-2): Edit 2 replays on every click, is shorter at 1.2 s instead of 2 s and has a single static state.
- [Edit 3](https://useanimations.com/icons/edit-3): Edit 3 replays on every click, is shorter at 1.33 s instead of 2 s and has a single static state.

## FAQ

### Does Edit finish its animation after mouse leave?

It reverses from the frame it reached back to the start, so a quick pass of the pointer gives a short nudge rather than the full 2 s. Keyboard focus plays it as well; a tap on a touch screen does not.

### Is Edit decorative?

By default it is aria-hidden. Pass aria-label="Edit" to announce it as an image, or leave it hidden when the link or button it sits in has its own text.

### Can Edit play on click instead?

Yes: pass interaction="click-replay". It then replays once from the start on every click unless reduced motion is preferred.

## Related icons

- [Calendar](https://useanimations.com/icons/calendar) (hover)
- [Explore](https://useanimations.com/icons/explore) (hover)
- [Trash](https://useanimations.com/icons/trash) (hover)
- [Trash V2](https://useanimations.com/icons/trash-v2) (hover)
- [Home](https://useanimations.com/icons/home) (hover)
- [Zoom Out](https://useanimations.com/icons/zoom-out) (hover)
- [Folder](https://useanimations.com/icons/folder) (hover)
- [Settings](https://useanimations.com/icons/settings) (hover)
- [Zoom In](https://useanimations.com/icons/zoom-in) (hover)
- [Info](https://useanimations.com/icons/info) (hover)
- [Link 2](https://useanimations.com/icons/link-2) (click-replay)
- [Shield Off](https://useanimations.com/icons/shield-off) (click-toggle)

[All action icons](https://useanimations.com/categories/action) · [All icons](https://useanimations.com/icons)
