dotLottie Web

High-performance Lottie & dotLottie animation player for the web

Library
npm
v0.80.0
888 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
84 /100 Excellent
Development Activity 92
Maintenance 100
Community 56
Maturity 48
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
82 /100 Excellent
Architecture 85
Code Quality 82
Innovation 88
Learning Curve 72

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 DotLottie class that plays both .json Lottie and .lottie archive formats
  • Three swappable rendering backends — Software (Canvas2D), WebGL2, and experimental WebGPU
  • DotLottieWorker for off-main-thread rendering via Web Workers and OffscreenCanvas
  • 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 DotLottieWorker to avoid jank
  • Shipping the same animation asset across iOS, Android, and web via the shared dotlottie-rs engine

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 12 apps in this directory

TypeScript
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 5 days ago
Python
47%
MIT

Docs

CMS · File Storage

16,868

Open-source collaborative knowledge platform with real-time editing, AI writing tools, and full self-hosting control — built by the French and German governments.

View details
88
Repo Health
81
Technical
68
Dependency
Built with
Python 47%
TypeScript 45%
Updated 4 days ago
TypeScript
97%
Other

Infisical

Devops · Security

29,468

The open-source platform for secrets, certificates, privileged access, and AI agent security — all in one self-hostable system.

View details
91
Repo Health
84
Technical
65
Dependency
Built with
TypeScript 97%
Updated 4 days ago
TypeScript
97%
Other

Infisical

Devops · Security

29,468

The open-source platform for secrets, certificates, privileged access, and AI agent security — all in one self-hostable system.

View details
91
Repo Health
84
Technical
65
Dependency
Built with
TypeScript 97%
Updated 4 days ago
TypeScript
78%
LGPL 3.0

Latitude

AI Agents · Monitoring

4,686

Open-source AI agent monitoring that catches what will break next before your users do.

View details
86
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 78%
Rust 11%
Python 11%
Updated 1 weeks ago
PHP
48%
AGPL 3.0

Leantime

Collaboration · Productivity · Project Management

11,672

Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira

View details
90
Repo Health
68
Technical
65
Dependency
Built with
PHP 48%
CSS 20%
Blade 17%
Updated 1 weeks ago
PHP
48%
AGPL 3.0

Leantime

Collaboration · Productivity · Project Management

11,672

Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira

View details
90
Repo Health
68
Technical
65
Dependency
Built with
PHP 48%
CSS 20%
Blade 17%
Updated 1 weeks ago
TypeScript
96%
AGPL 3.0

Libra AI

AI Development · No Code Platforms

1,684

Open-source AI-powered platform that generates and deploys full-stack web applications from natural language prompts, built natively for Cloudflare Workers.

View details
31
Repo Health
71
Technical
68
Dependency
Built with
TypeScript 96%
Updated 1 years ago
TypeScript
44%
Other

Magic

AI Agents · Automation · Low Code Platforms

5,043

Magic is an enterprise-grade open-source AI agent platform combining a generalist AI agent, workflow engine, IM, and collaborative office system for running an AI-powered digital workforce.

View details
70
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 44%
PHP 32%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers