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
DotLottie— the core class representing a loaded or built.lottiepackage. StaticfromFile/fromBytesloaders, plus instance methods for managing animations, themes, state machines, assets, and serialization.DotLottieBuilder— a stateful builder for constructing a new package from scratch.DotLottieReader— a lazy, read-only view over an archive; reads entries on demand.DotLottieMerger— merges multiple packages, plus theMergeStrategyenum.
Types
Types —
AnimationOptions,AssetReferences.Errors — thrown error messages and the conditions that cause them.
Navigate using the links above, or proceed sequentially.
Next up: DotLottie Class