API Reference

Complete API reference for dotlottie-io, covering the DotLottie, DotLottieBuilder, DotLottieReader, and DotLottieMerger classes.

dotlottie-io API Reference

This reference covers the public classes and types exported by @lottiefiles/dotlottie-io, for both the Node.js and Browser (WASM) builds. The API is identical across both — differences are called out on the relevant page.

JSON payloads (animations, themes, state machines) are passed into the API as Buffer/Uint8Array or a JSON string, and returned from the API as string. Use JSON.parse() on the returned value.

Classes

  1. DotLottie — the core class representing a loaded or built .lottie package. Static fromFile/fromBytes loaders, plus instance methods for managing animations, themes, state machines, assets, and serialization.

  2. DotLottieBuilder — a stateful builder for constructing a new package from scratch.

  3. DotLottieReader — a lazy, read-only view over an archive; reads entries on demand.

  4. DotLottieMerger — merges multiple packages, plus the MergeStrategy enum.

Types

  • TypesAnimationOptions, AssetReferences.

  • Errors — thrown error messages and the conditions that cause them.

Navigate using the links above, or proceed sequentially.

Next up: DotLottie Class

Last updated: August 5, 2026 at 11:47 AMEdit this page