# Mail animated icon

> Add the Mail micro animation to React with react-useanimations or shadcn. It plays on hover and reverses on mouse leave; free MIT Lottie and SVG files.

Mail is a 0.67 s micro animation that plays on hover and reverses on mouse leave; use it for inbox and archive views in mail clients. Hover icons typically mark navigation items, delete buttons, settings, zoom controls and social links. Also known as email, envelope and inbox.

## Facts

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

## Files

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

## React

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

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

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

## shadcn/ui

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

```tsx
import { AnimatedMail } from '@/components/animations/mail';

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

## HTML and lottie-web

```html
<div id="mail-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('mail-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/mail.json' });
  el.addEventListener('mouseenter', () => { a.setDirection(1); a.play(); });
  el.addEventListener('mouseleave', () => { a.setDirection(-1); a.play(); });
</script>
```

## FAQ

### What does Mail do when the pointer leaves halfway?

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 0.67 s. Taps on touch screens are ignored, but keyboard focus plays it.

### Will screen readers read the Mail icon?

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

### Can Mail 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

- [Inbox](https://useanimations.com/icons/inbox) (hover-replay)
- [Message Circle](https://useanimations.com/icons/message-circle) (hover-replay)
- [Message Square](https://useanimations.com/icons/message-square) (hover-replay)
- [Share](https://useanimations.com/icons/share) (hover)
- [Archive](https://useanimations.com/icons/archive) (hover)
- [Copy](https://useanimations.com/icons/copy) (hover)
- [User plus](https://useanimations.com/icons/user-plus) (hover)
- [User X](https://useanimations.com/icons/user-x) (hover)
- [User minus](https://useanimations.com/icons/user-minus) (hover)
- [User](https://useanimations.com/icons/user) (hover-replay)
- [File](https://useanimations.com/icons/file) (hover-replay)
- [Paperclip](https://useanimations.com/icons/paperclip) (hover-replay)

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