# Infinity animated icon

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

Use the Infinity icon for infinite scroll and load-more indicators: it loops continuously and takes 4 s. Looping icons typically show loading spinners, active alerts, a ringing bell or a scroll-down hint. Also known as endless and infinite loop.

## Facts

- Interaction: [Loop](https://useanimations.com/interactions/loop). Plays continuously; stays on the static first frame when reduced motion is preferred.
- Category: [Loading](https://useanimations.com/categories/loading)
- Duration: 4.00 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 2.1 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

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

## React

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

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

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

## shadcn/ui

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

```tsx
import { AnimatedInfinity } from '@/components/animations/infinity';

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

## HTML and lottie-web

```html
<div id="infinity-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('infinity-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: true, autoplay: false, path: 'https://useanimations.com/icons/infinity.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  a.addEventListener('DOMLoaded', () => { a.goToAndStop(0, true); if (!motion.matches) a.play(); });
  motion.addEventListener('change', (event) => { if (event.matches) a.goToAndStop(0, true); else a.play(); });
</script>
```

## FAQ

### Can I pause the Infinity loop?

It pauses by itself while scrolled out of view and stays on its first frame when reduced motion is preferred or autoplay={false} is set. To show it only while something is pending, render it conditionally.

### How do screen readers announce the Infinity loader?

They don't unless you pass aria-label="Loading…", which gives it role="img". Often better: keep it hidden and set aria-busy="true" on the region that is loading.

### Can Infinity loop only while hovered instead?

Yes: pass interaction="hover-loop". It then loops while hovered, finishes the current cycle after mouseleave and stays static when reduced motion is preferred.

## Related icons

- [Loading circular](https://useanimations.com/icons/loading) (loop)
- [Loading V2](https://useanimations.com/icons/loading-v2) (loop)
- [Loading V3](https://useanimations.com/icons/loading-v3) (loop)
- [Loading V4](https://useanimations.com/icons/loading-v4) (loop)

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