The Manifest

Understand the manifest.json entry in a .lottie package, the initial animation/state machine, and v1 vs v2 path layouts.

The Manifest

Every .lottie package contains a manifest.json entry describing its contents — the list of animations, themes, and state machines, plus which one (if any) a player should load first.

Reading the manifest

dotlottie.getManifestJson(); // → string

Returns the full manifest as a JSON string. Parse it with JSON.parse() to inspect its fields directly, or use the more targeted methods below.

Setting the initial animation or state machine

dotlottie.setInitial("hero", null); // load "hero" first, no state machine
dotlottie.setInitial(null, "sm-button"); // load the "sm-button" state machine first
dotlottie.setInitial(null, null); // clear both
dotlottie.getInitialAnimationId(); // → string | null
dotlottie.getInitialAnimation(); // → string | null (the Lottie JSON itself)

v1 and v2 archive layouts

dotlottie-io reads both dotLottie archive layouts, but always writes v2:

Contentv2 pathLegacy v1 path
Animationa/{id}.jsonanimations/{id}.json
Imagei/{filename}images/{filename}
Audiou/{filename}audio/{filename}
Themet/{id}.json— (v2 only)
State machines/{id}.json— (v2 only)

Themes and state machines don't exist in the v1 layout — they're a v2-only addition. When you load a v1 file with DotLottie.fromFile/fromBytes, its manifest is normalized to version: "2" on read, and any .lottie you write back out (via toBytes) is always in the v2 layout, regardless of what you loaded.

Next up: Migrating from dotlottie-js

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