# Heart V2 animated icon

> Add the Heart V2 micro animation to React with react-useanimations or shadcn. It replays on every click; free MIT Lottie and SVG files.

The Heart V2 animated icon replays on every click in 1.33 s, a good fit for like, favourite and bookmark buttons on cards. Click icons typically confirm send, save, refresh, download, add-to-cart and formatting buttons. Also known as like, favorite and love.

## Facts

- Interaction: [Click replay](https://useanimations.com/interactions/click-replay). Replays once from the start on every click unless reduced motion is preferred.
- Category: [Action](https://useanimations.com/categories/action)
- Duration: 1.33 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 1.5 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

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

## React

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

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

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

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/heart-v2.json
```

```tsx
import { AnimatedHeartV2 } from '@/components/animations/heart-v2';

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

## HTML and lottie-web

```html
<div id="heart-v2-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('heart-v2-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/heart-v2.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  el.addEventListener('click', () => { if (!motion.matches) a.playSegments([0, a.totalFrames], true); });
</script>
```

## Other versions

- [Heart](https://useanimations.com/icons/heart): Heart toggles between two states on click and is shorter at 0.33 s instead of 1.33 s.

## FAQ

### What happens if Heart V2 is clicked again before it finishes?

No queue: every click restarts the 1.33 s run from the first frame. With reduced motion preferred, clicks still reach your onClick but the icon stays still.

### How do I make Heart V2 an accessible button?

Put its events on a real button with the render prop: render={(events, icon) => <button aria-label="Heart V2" {...events}><span {...icon} /></button>}. The animation itself stays aria-hidden.

### Can Heart V2 play on hover instead?

Yes: pass interaction="hover-replay". It then plays once on mouseenter unless reduced motion is preferred. Leaving does not stop it; entering during playback does not restart it.

## Related icons

- [Star](https://useanimations.com/icons/star) (click-toggle)
- [Thumb up](https://useanimations.com/icons/thumb-up) (click-toggle)
- [Thumbs Down](https://useanimations.com/icons/thumbs-down) (click-replay)
- [Rotate Cw](https://useanimations.com/icons/rotate-cw) (click-replay)
- [Minus Circle](https://useanimations.com/icons/minus-circle) (click-replay)
- [Refresh V2](https://useanimations.com/icons/refresh-v2) (click-replay)
- [Edit 3](https://useanimations.com/icons/edit-3) (click-replay)
- [Edit 2](https://useanimations.com/icons/edit-2) (click-replay)
- [Link 2](https://useanimations.com/icons/link-2) (click-replay)
- [Power](https://useanimations.com/icons/power) (click-replay)
- [Check](https://useanimations.com/icons/check) (click-replay)
- [Plus Square](https://useanimations.com/icons/plus-square) (click-replay)

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