Introduction
Lottie is a format for vector animations, stored as JSON. It started as the output of Bodymovin, a plugin that exports animations from Adobe After Effects, and took its name from Lottie, the libraries Airbnb released in 2017 to play those files in apps and on the web.
It is widely used for small interface animations, animated icons and illustrations,
because one small text file scales to any screen size. A Lottie file is ordinary JSON
with the .json extension; the zipped dotLottie variant uses
.lottie.
Structure
The file is one JSON object. Short keys at the top level give the format version
(v), the frame rate (fr), the first and last frame
(ip, op) and the width and height (w,
h). A layers array holds the layers, each with a type
(shape, solid, image, text, precomposition or null), its timing and its transform.
An assets array holds images and precompositions that layers refer to.
Shape layers describe paths, fills, strokes, gradients and modifiers such as trim paths. Any animatable value is either a fixed value or a list of keyframes with timing and easing curves.
{
"v": "5.7.4", "fr": 30, "ip": 0, "op": 60,
"w": 512, "h": 512,
"assets": [],
"layers": [ … ]
}
The reference pages cover the animation object and animated properties, every layer type and every shape element.
Not described
The animation, layers and shapes pages follow the Lottie specification and the Lottie Docs site.
Known, not yet covered
- Reference: the internals of audio (
au) and camera (pe) are not described. - Reference: the Pro Levels effect’s long list of per-channel sliders is summarised, not listed (layers).
- Reference: dotLottie (
.lottie, a zip withmanifest.json) is not documented. - Viewer: there is no Lottie plugin yet.
Also used for
- Browser extension manifest – The JSON manifest of a browser extension: its name, permissions and scripts.
- GeoJSON – Map points, lines and areas with properties, written as JSON.
- Hugging Face model config (config.json) – config.json: a model’s architecture and sizes, read before the weights.
- Hugging Face tokenizer (tokenizer.json) – tokenizer.json: a language model’s vocabulary and tokenising rules.
- JSON Schema – A JSON document that describes and validates other JSON documents.
- JavaScript Object Notation – Text format for objects, arrays, strings, numbers and booleans.
- Visual Studio Code settings – VS Code’s settings.json: dotted setting IDs in JSON with comments.
- jCal: iCalendar in JSON – iCalendar as JSON: events, to-dos and time zones as nested arrays.
- jCard: vCard in JSON – vCard 4.0 contacts as JSON: names, numbers and addresses as arrays.
- npm package manifest (package.json) – A JavaScript package’s name, version, scripts and dependencies, in JSON.
Links
Software
- Adobe After Effects – Adobe’s animation program, which exports Lottie with the Bodymovin plugin (Windows, macOS)
- LottieFiles – website for previewing, editing and sharing Lottie animations (web browser)
Developers
- lottie-web – Airbnb’s player for web pages (JavaScript)
- lottie-android – Airbnb’s player for Android apps (Kotlin, Java)
- lottie-ios – Airbnb’s player for iOS and macOS apps (Swift)
- rlottie – Samsung’s Lottie renderer (C++)
Reference
- Lottie specification – the Lottie Animation Community’s specification of the core format
- Lottie Docs – community documentation of the full format as exporters write it