RepositoryJavaScriptCNChina
chenqingspring

chenqingspring/react-lottie

Render After Effects animations on React based on lottie-web

1.7kstars
349forks
0issues
4views

🎬 Bring After Effects animations into React with Lottie

A small React wrapper around lottie-web for playing JSON animations exported from Adobe After Effects.

react-lottie by chenqingspring is a React component that renders animations produced with the Lottie workflow. It builds on lottie-web (previously Bodymovin), which plays After Effects animations exported as JSON using SVG, canvas, or HTML. The library gives React apps a straightforward way to drop vector animations into a UI and control how they behave.

✨ Highlights

  • Lottie-web wrapper: Renders After Effects animations exported as JSON through lottie-web in React components.
  • Multiple renderers: Supports playback via SVG, canvas, or HTML, depending on what lottie-web provides for the animation.
  • After Effects feature support: The README notes support for solids, shape layers, masks, alpha mattes, trim paths, and dash patterns, with features added over time.
  • Playback control: Animations can move forward or backward and respond to interactions through component options and state.
  • Simple component API: Uses options such as loop, autoplay, animationData (or a JSON path in CDN examples), and rendererSettings like preserveAspectRatio.
  • Modern React compatibility: Targets React 16.8 or newer, including React 17, 18, and 19, with the react: ">=16.8.0" peer dependency.
  • Updated lifecycle behavior: Uses supported lifecycles (componentDidMount, componentDidUpdate, componentWillUnmount) so React 17+ does not warn about legacy lifecycles or miss data/path reloads.
  • CDN and tooling notes: The package does not ship a UMD/browser global build; the README shows ES module loading via an import map (for example, esm.sh with ?external=react) or using lottie-web directly without React.

💡 Why it matters

If you already have motion assets coming out of After Effects, react-lottie provides a practical bridge into a React codebase without manually rebuilding the animation. Instead of shipping large raster sequences, you can bundle or load vector animation JSON and render it with lottie-web while keeping control over looping, autoplay, and interaction-driven playback.

It is a good fit for React projects that need branded motion, onboarding illustrations, micro-interactions, or explainer visuals from the Lottie ecosystem. The README also sets clear expectations around setup details—no UMD bundle, TypeScript types via @types/react-lottie, and jest-canvas-mock for jsdom-based tests—which helps when integrating it into real apps.


#React #Lottie #AfterEffects #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryKotlin
alexzhirkevich/compottie

Compose Multiplatform library for rendering Lottie animations with a custom pure Kotlin renderer

701
Nov 4, 2026
RepositoryJavaScript
OYsun/AE-Element

:art: use bodymovin to render some interesting After Effects vector element

189
Mar 28, 2019
RepositoryJavaScript
react/react

The library for web and native user interfaces.

253.0k
Nov 30, 2026
RepositoryTypeScript
lottie-react-native/lottie-react-native

Lottie wrapper for React Native.

17.2k
Nov 28, 2026
RepositoryC#
CommunityToolkit/Lottie-Windows

Lottie-Windows is a library (and related tools) for rendering Lottie animations on Windows 10 and Windows 11.

724
Nov 25, 2026
RepositoryKotlin
omarsahl/Flopsy

A cute little bunny animation that responds to text field interactions.

262
Jun 13, 2018
RepositoryC++
Aghajari/AXrLottie

AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)

150
Nov 10, 2022
RepositoryPython
LottieFiles/lottie-docs

Documentation for the lottie file format

63
Apr 17, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026