dotlottie-web

Из публичных источников

dotlottie-web — открытый плеер Lottie и dotLottie для веба на ядре Rust и WASM, библиотека для анимации в интерфейсах и SDK.

AI SkillКатегория: Библиотеки и SDK · Анимация и 3DOpen sourceданные проверены 15 окт. 2026 г.

Обзор

Воспроизведение Lottie-анимаций в браузере часто упирается в медленные рендереры, неполную поддержку функций или тяжёлую нагрузку на основной поток. dotlottie-web — официальный плеер LottieFiles, который загружает и классические файлы Lottie .json, и архивы dotLottie .lottie через один атрибут src. Ядро написано на Rust и собрано в WASM, в основе — движок ThorVG. Доступны бэкенды Software (Canvas2D), WebGL2 и экспериментальный WebGPU с единым классом DotLottie. Поддерживаются возможности dotLottie v2: темы, интерактивные конечные автоматы, аудио, именованные маркеры и слоты во время выполнения. Вариант DotLottieWorker выводит анимацию в Web Worker через OffscreenCanvas, чтобы интерфейс оставался отзывчивым. Библиотека подойдёт фронтенд-разработчикам, которые создают анимированные интерфейсы на чистом JavaScript или в React, Vue, Svelte, Solid и Web Components. Распространяется под лицензией MIT и устанавливается через npm.
  • animation
  • animation-library
  • canvas
  • dotlottie
  • javascript
  • lottie
  • lottie-animation
  • lottie-player
  • motion-graphics
  • react
  • solidjs
  • svelte

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Официальный сайтИз публичных источниковиз метаданных каталога
    lottiefiles.com/dotlottie ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/LottieFiles/dotlottie-web ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
Claude CodeНеизвестно———
Claude (web & desktop)Неизвестно———
OpenAI CodexНеизвестно———
ChatGPTНеизвестно———
CursorНеизвестно———
GitHub CopilotНеизвестно———
Gemini CLIНеизвестно———

Релизы

проверено 29 окт. 2026 г.
v0.81.0Последний6 окт. 2026 г.Официальный источник ↗

Файлы версии 0.81.0

К релизу не приложены файлы.

История релизов

Профиль качества

алгоритм quality-v1.0 · оценено 15 окт. 2026 г.
Оценка качества97
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 2020
last activity 1 days ago
Документация · 1515
README 16568 chars, description present
Готовность к использованию · 1515
install instructions: yes; releases: yes
Метаданные · 1010
4/4 of description, homepage, license, topics
Релизы · 1010
10 release(s), latest 10 days ago
Точность категории · 1010
classifier confidence 1
Популярность · 107
913 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MIT
Сообщество · 55
issues enabled, 56 forks

Лицензия

MIT
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/LottieFiles/dotlottie-webОсновной★ 913 звёздактивность 14 окт. 2026 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

pixijsПохожий
PixiJS — открытая библиотека для 2D-рендеринга в HTML5, позволяющая создавать быструю интерактивную графику и игры в браузере на WebGL и WebGPU.MIT · Библиотеки и SDK
xyflowПохожий
xyflow (React Flow и Svelte Flow) — открытая библиотека под лицензией MIT для создания интерактивных узловых интерфейсов, блок-схем и редакторов графов на React или Svelte.MIT · Библиотеки и SDK
animeПохожий
Anime.js — легковесная JavaScript-библиотека для анимации CSS-свойств, SVG, DOM-атрибутов и JavaScript-объектов, распространяемая по лицензии MIT.MIT · Библиотеки и SDK
remotionПохожий
Remotion — библиотека на React для программного создания видео: видеоролики пишутся кодом и рендерятся в файлы без ручного монтажа.Библиотеки и SDK
three.jsПохожий
three.js — JavaScript-библиотека для 3D с открытым кодом (лицензия MIT), которая упрощает создание WebGL- и WebGPU-сцен в браузере.MIT · Библиотеки и SDK
tiptapПохожий
Tiptap — безголовая библиотека богатого текстового редактора для JavaScript, построенная на ProseMirror и расширяемая более чем сотней расширений.MIT · Библиотеки и SDK

README

Из LottieFiles/dotlottie-web · лицензия MIT · загружено 29 окт. 2026 г.

[npm] [npm bundle size] [npm downloads] [jsDelivr hits] [GitHub]

Why dotLottie Web

  • 📦 Lottie + dotLottie, one player — point src at a classic Lottie .json or a .lottie archive. The .lottie format bundles multiple animations, themes, state machines, and embedded assets into a single compressed file.
  • 🦀 Rust + WASM core — powered by dotlottie-rs, the same engine that ships in iOS, Android, and native dotLottie players. One battle-tested implementation across every platform.
  • 🎨 ThorVG renderer — an industrial-grade vector graphics engine with the broadest Lottie feature coverage of any web renderer. See the ThorVG Lottie support matrix.
  • ⚡ Three rendering backends — Software (Canvas2D), WebGL2, and WebGPU (experimental). Switch with a one-line import change — same DotLottie class everywhere.
  • 📁 dotLottie v2 ready — first-class theming, interactive state machines, and audio in a single .lottie file. No userland wiring required.
  • 🧵 Off-main-thread — DotLottieWorker renders on a Web Worker with OffscreenCanvas, keeping your UI buttery-smooth even with dozens of animations.
  • ⚛️ 6 first-party SDKs — Vanilla JS, React, Vue, Svelte, Solid, and a Web Component. Plus SSR-safe (Next.js example included) and Node.js 18+ support.
  • 🎛️ Rich runtime control — themes, slots (color/scalar/vector/gradient/text/image), markers, segments, layouts (fit + align), playback modes (forward/reverse/bounce), frame interpolation, 25+ typed events.

Quick Start

Install the package for your framework, then drop in a few lines. The same player loads both Lottie .json and dotLottie .lottie files — just point src at either:

Vanilla JS

npm install @lottiefiles/dotlottie-web
<canvas id="canvas" style="width: 300px; height: 300px"></canvas>
import { DotLottie } from '@lottiefiles/dotlottie-web';

const dotLottie = new DotLottie({
  canvas: document.getElementById('canvas'),
  src: 'https://your-animation-url.lottie',
  autoplay: true,
  loop: true,
});
npm install @lottiefiles/dotlottie-react
import { DotLottieReact } from '@lottiefiles/dotlottie-react';

const App = () => (
  <DotLottieReact
    src="path/to/animation.lottie"
    loop
    autoplay
  />
);
npm install @lottiefiles/dotlottie-vue
<script setup>
import { DotLottieVue } from '@lottiefiles/dotlottie-vue';
</script>

<template>
  <DotLottieVue
    style="height: 500px; width: 500px"
    autoplay
    loop
    src="https://path-to-lottie.lottie"
  />
</template>
npm install @lottiefiles/dotlottie-svelte
<script lang="ts">
  import { DotLottieSvelte } from '@lottiefiles/dotlottie-svelte';
</script>

<DotLottieSvelte src="path/to/animation.lottie" loop autoplay />
npm install @lottiefiles/dotlottie-solid
import { DotLottieSolid } from '@lottiefiles/dotlottie-solid';

const App = () => (
  <DotLottieSolid
    src="path/to/animation.lottie"
    loop
    autoplay
  />
);
<dotlottie-wc
  src="https://lottie.host/4db68bbd-31f6-4cd8-84eb-189de081159a/IGmMCqhzpt.lottie"
  autoplay
  loop
></dotlottie-wc>

<script
  type="module"
  src="https://unpkg.com/@lottiefiles/dotlottie-wc@latest/dist/dotlottie-wc.js"
></script>

Or via npm:

npm install @lottiefiles/dotlottie-wc
import '@lottiefiles/dotlottie-wc';

Features

🤖 Interactive State Machines

dotLottie v2 ships state machines built into the file format — no JS glue required. Define states, transitions, and inputs in a single .lottie and drive them at runtime through pointer events, custom events, or input values.

const dotLottie = new DotLottie({
  canvas: document.getElementById('canvas'),
  src: 'interactive-button.lottie',
  stateMachineId: 'main',
  autoplay: true,
});

The player exposes typed events for stateMachineStart, stateMachineTransition, stateMachineStateEntered, custom events, and input changes — perfect for wiring animations into your UI logic.

🎨 Runtime Theming

Switch palettes, animate gradients, swap text, or replace images at runtime — without re-exporting from After Effects. Themes can be embedded in the .lottie manifest or supplied programmatically.

// Use a theme defined in the .lottie manifest
dotLottie.setTheme('dark');

// Or supply a theme object at runtime
dotLottie.setThemeData({
  rules: [
    { id: 'primary', type: 'Color', value: [0.9, 0.2, 0.4, 1.0] },
  ],
});

The full Theme type covers color, scalar, position, vector, gradient, image, and text rules — all keyframe-aware.

🔊 Audio Support

dotLottie files can carry embedded audio tracks alongside the animation timeline — handy for UI sound effects, onboarding flows, or interactive characters. Audio is decoded and played in lockstep with the animation timeline.

Audio is an experimental feature in dotlottie-rs. Browser autoplay policies still apply — initiate playback from a user gesture.

🧵 Off-Main-Thread Rendering

For pages with many animations, swap DotLottie for DotLottieWorker. Identical API, but rendering happens on a Web Worker with an OffscreenCanvas, freeing the main thread for layout, scrolling, and your app code.

import { DotLottieWorker } from '@lottiefiles/dotlottie-web';

const player = new DotLottieWorker({
  canvas: document.getElementById('canvas'),
  src: 'animation.lottie',
  autoplay: true,
  loop: true,
  workerId: 'shared-pool', // optional: share one worker across many instances
});

All DotLottieWorker methods are async (Promise-returning) since they cross a worker boundary.

⚡ Hardware-Accelerated Rendering

The default Software backend works everywhere. For demanding workloads — many concurrent animations, large canvases, complex masks — opt in to GPU rendering via subpath imports:

// WebGL2 — broadly supported
import { DotLottie } from '@lottiefiles/dotlottie-web/webgl';

// WebGPU — experimental, modern Chromium / Safari TP
import { DotLottie } from '@lottiefiles/dotlottie-web/webgpu';

The class name (DotLottie) and API surface are identical across all three backends, so swapping renderers is a one-line change. Each backend ships its own optimized WASM build via package.json conditional exports.

Want to see the difference on your own hardware? The hosted perf-test page compares Software vs WebGL vs WebGPU vs Skottie/CanvasKit head-to-head.

🖼️ More built-in capabilities

  • Multi-animation .lottie files — animationId config + loadAnimation(id) to switch between bundled animations
  • Named markers — setMarker(name) and markers() to play AE-defined segments
  • Frame segments — setSegment(start, end) for arbitrary frame ranges
  • Layout — fit (contain / cover / fill / fit-width / fit-height / none) + normalized align: [x, y]
  • Slots — bind dynamic data to color, scalar, vector, gradient, text, and image slots at runtime
  • Playback modes — forward / reverse / bounce / reverse-bounce with configurable loop counts
  • Frame interpolation — smooth subframe playback (default on) or pinned to the original AE frame rate
  • Freeze on offscreen — automatically pause rendering when the canvas leaves the viewport
  • 25+ typed events — play, pause, frame, complete, loop, load, loadError, freeze, plus the full state-machine event suite

Packages

All packages render both Lottie (.json) and dotLottie (.lottie) animations.

PackageDescription
@lottiefiles/dotlottie-webCore Lottie & dotLottie player — Rust/WASM via dotlottie-rs, Canvas2D / WebGL / WebGPU, Node-isomorphic
@lottiefiles/dotlottie-reactReact component for Lottie & dotLottie
@lottiefiles/dotlottie-vueVue 3 component for Lottie & dotLottie
@lottiefiles/dotlottie-svelteSvelte component for Lottie & dotLottie
@lottiefiles/dotlottie-solidSolid component for Lottie & dotLottie
@lottiefiles/dotlottie-wcFramework-agnostic Web Component for Lottie & dotLottie

Each package README contains its full API reference, prop tables, and event documentation.

dotLottie Viewer

A hosted companion app at lottiefiles.github.io/dotlottie-web for inspecting, debugging, and benchmarking animations:

PageWhat it does
HomeDrop a .lottie or .json file to preview rendering and inspect manifest details
PlaygroundInteractive editor for player config, themes, markers, and animation switching
PerformanceStress test across 40+ animations — compare Software / WebGL / WebGPU / Skottie head-to-head on your own hardware, with seedable runs for reproducibility
ListGallery of curated animations
EmbedEmbedding patterns and demos

Source: apps/viewer/.

Live Examples (CodePen)

@lottiefiles/dotlottie-web — Getting Started · Playback Controls · Dynamic Loading · Worker · Multi Animations · Advanced Layout · Named Markers · Theming · Interactivity

@lottiefiles/dotlottie-react — Getting Started · Custom Controls

@lottiefiles/dotlottie-vue — Getting Started

Local Examples

Runnable example apps in examples/:

ExamplePackageHighlights
web@lottiefiles/dotlottie-webState machines, themes, segments, layout
web-node@lottiefiles/dotlottie-web (Node.js)Server-side rendering to a buffer
react@lottiefiles/dotlottie-reactRenderer selection (canvas/webgl/webgpu)
vue@lottiefiles/dotlottie-vueTheme toggling, ref/event patterns
solid@lottiefiles/dotlottie-solidSignal-based state, theme/animation switching
wc@lottiefiles/dotlottie-wcWeb Component usage and event delegation
next@lottiefiles/dotlottie-react (Next.js)SSR-safe rendering with the App Router
pnpm install && pnpm run build
cd examples/web
pnpm run dev

Browser & Runtime Support

Required: WebAssembly · Canvas 2D · Fetch API Optional (enhances perf): Web Workers · OffscreenCanvas · WebGL2 (for /webgl) · WebGPU (for /webgpu)

BrowserMinimum version
Chrome57+ (Mar 2017)
Firefox52+ (Mar 2017)
Safari11+ (Sep 2017)
Edge16+ (Oct 2017)
iOS Safari11+ (Sep 2017)

Node.js: 18+ — @lottiefiles/dotlottie-web is isomorphic and runs server-side for thumbnail generation, frame extraction, or static rendering.

Development

Prerequisites: Node.js 22+, pnpm 10+

git clone https://github.com/LottieFiles/dotlottie-web.git
cd dotlottie-web
pnpm install
pnpm run build    # Build all packages
pnpm run dev      # Watch mode
pnpm run test     # Run tests
pnpm run lint     # Lint
pnpm run format   # Format

Contributing

Contributions are welcome! Read the Contributing Guidelines and Code of Conduct before opening an issue or PR.

License

MIT © LottieFiles

Открыть репозиторий ↗