dotLottie Web
High-performance Lottie & dotLottie animation player for the web
Repository Health
Technical Analysis
dotLottie Web is LottieFiles’ official browser player for both classic Lottie .json animations and the newer .lottie archive format, built on a Rust + WASM core (dotlottie-rs) shared with the iOS, Android, and native players. Rendering goes through ThorVG, a vector-graphics engine with the broadest Lottie feature coverage of any web renderer, exposed through Canvas2D, WebGL2, or experimental WebGPU backends behind a single DotLottie API.
The repo is a monorepo whose core vanilla-JS package (@lottiefiles/dotlottie-web) is wrapped by first-party React, Vue, Svelte, Solid, and Web Component packages, plus a DotLottieWorker variant that renders off the main thread via OffscreenCanvas for smooth performance with many concurrent animations.
What You Get
- A single
DotLottieclass that plays both.jsonLottie and.lottiearchive formats - Three swappable rendering backends — Software (Canvas2D), WebGL2, and experimental WebGPU
DotLottieWorkerfor off-main-thread rendering via Web Workers andOffscreenCanvas- First-party dotLottie v2 support for theming, interactive state machines, and embedded audio
- Official wrapper packages for React, Vue, Svelte, Solid, and native Web Components
Common Use Cases
- Rendering marketing/product animations exported from After Effects (via Lottie) directly in the browser
- Building interactive onboarding or micro-interaction animations driven by dotLottie v2 state machines
- Rendering dozens of small animations (icons, loaders) off the main thread with
DotLottieWorkerto avoid jank - Shipping the same animation asset across iOS, Android, and web via the shared
dotlottie-rsengine
Under The Hood
Architecture: packages/web/src/dotlottie.ts wraps a Rust-compiled WASM module (loaded via wasm-loader.ts) that does the actual Lottie/dotLottie parsing and ThorVG rendering; the JS layer’s job is orchestrating canvas/WebGL/WebGPU context setup (src/webgl, src/webgpu), an event-manager.ts for playback events, and an animation-frame-manager.ts driving the render loop. DotLottieWorker (src/worker) re-hosts the same engine inside a Web Worker using OffscreenCanvas, keeping the public API identical between main-thread and worker rendering.
Tech Stack: TypeScript for the JS SDK layer over a Rust + WASM core (dotlottie-rs, a sibling repo) with ThorVG as the underlying vector-graphics renderer; builds use tsdown/Rolldown with a custom inline-worker plugin (rolldown-plugins/plugin-inline-worker.ts) to bundle the worker script alongside the WASM binary.
Code Quality: The web package has a dedicated Vitest suite (tests/dotlottie.test.ts, tests/worker-canvas-adoption.test.ts, tests/wasm-loader.test.ts, plus Node-specific variants) covering WASM loading, worker/canvas handoff, and the inline-worker build plugin — an unusually thorough test surface for a graphics library, reflecting the complexity of coordinating three rendering backends and a worker mode.
API Design: The public surface centers on one class (new DotLottie({canvas, src})) with the same shape whether targeting Canvas2D, WebGL2, or a Web Worker — switching backends is a one-line import change per the README — while advanced dotLottie v2 features (themes, state machines, audio) stay declarative in the .lottie file rather than requiring extra JS wiring.
Used by 11 apps in this directory
AFFiNE
Productivity · Project Management · Note Taking
Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.
Docs
File Storage · CMS
Open-source collaborative knowledge platform with real-time editing, AI writing tools, and full self-hosting control — built by the French and German governments.
Infisical
Security · Devops
The open-source platform for secrets, certificates, privileged access, and AI agent security — all in one self-hostable system.
Infisical
Security · Devops
The open-source platform for secrets, certificates, privileged access, and AI agent security — all in one self-hostable system.
Latitude
AI Agents · Monitoring
Open-source AI agent monitoring that catches what will break next before your users do.
Leantime
Productivity · Project Management · Collaboration
Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira
Leantime
Productivity · Project Management · Collaboration
Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira
Libra AI
AI Development · No Code Platforms
Open-source AI-powered platform that generates and deploys full-stack web applications from natural language prompts, built natively for Cloudflare Workers.
OpenSign
Digital Signiture
Self-host a full-featured DocuSign alternative with unlimited e-signatures, multi-signer workflows, and cryptographic PDF signing.