lottie-react

Render After Effects animations exported as Lottie JSON directly in React with full playback control.

lottie-react

React

Render After Effects animations exported as Lottie JSON directly in React with full playback control.

Fit

Bundle (gzip)

79.8 kB

314.8 kB raw

Install size includes transitive dependencies. Bundle size is gzipped browser payload.

Freshness

The Problem

Designers hand you a gorgeous After Effects animation, but shipping it as a video or GIF means huge files, no transparency, and zero interactivity. Recreating it by hand in CSS is a week of work and never quite matches.

What It Does

lottie-react plays Lottie JSON (exported from After Effects via Bodymovin) as crisp, resolution-independent vector animation. It exposes a simple component plus a useLottie hook so you can play, pause, seek, and react to events, keeping file sizes tiny and animations pixel-perfect.

Installation

bash
npm install lottie-react

Usage Example

jsx
import Lottie from 'lottie-react';
import loadingAnimation from './loading.json';

export function Loader() {
  return <Lottie animationData={loadingAnimation} loop autoplay />;
}

Related packages