---
title: "Star animated icon"
description: "Star animated icon (Essentials). The star is awarded and shines. Light: it gathers in, pops out with a rebound, and as it comes down from the pop five sparks flash out between its points and fade as they fly. Strong: a deeper gather with a counter-twist, then the star pops harder with a twist the other way, swings back through two decaying beats, and the sparks fly further."
canonical: https://generativeicons.com/icons/star/
---

# Star animated icon

The star is awarded and shines. Light: it gathers in, pops out with a rebound, and as it comes down from the pop five sparks flash out between its points and fade as they fly. Strong: a deeper gather with a counter-twist, then the star pops harder with a twist the other way, swings back through two decaying beats, and the sparks fly further.

- Id: `star`
- Category: Essentials
- Search terms: favorite, favourite, starred, add to favorites, mark favorite, featured, top pick, best
- 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/star.lottie (dotLottie, 10103 bytes, sha256 255ec310beeca0e614768ccf66c10a2462353cfe6921db0d852465263b23ac73)
- License: MIT

## Install

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

## React

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

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