Chinachenqingspring/react-lottie
Render After Effects animations on React based on lottie-web
🎬 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
optionssuch asloop,autoplay,animationData(or a JSON path in CDN examples), andrendererSettingslikepreserveAspectRatio. - 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.
Compose Multiplatform library for rendering Lottie animations with a custom pure Kotlin renderer
:art: use bodymovin to render some interesting After Effects vector element
Lottie-Windows is a library (and related tools) for rendering Lottie animations on Windows 10 and Windows 11.
A cute little bunny animation that responds to text field interactions.
AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.