---
title: "Heart animated icon"
description: "Heart animated icon (Essentials). The heart gives one short acknowledgement beat and returns to its anchored resting pose."
canonical: https://generativeicons.com/icons/heart/
---

# Heart animated icon

The heart gives one short acknowledgement beat and returns to its anchored resting pose.

- Id: `heart`
- Category: Essentials
- Search terms: love, like, favorite, favourite, add to favorites, wishlist, liked, valentine, romance, affection, kindness
- 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/heart.lottie (dotLottie, 29598 bytes, sha256 bc042c12c7eee542bc34925c132e3ce46c298c2ac6a7387b714d50afcde1345a)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add heart
```

## React

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

export function HeartIcon() {
  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/heart.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/heart/ · https://generativeicons.com/api/icons/heart
