Skip to content
BENIBIX Learn

Lottie

Design🎞️ Motion & VideoAnimation

Also known as Lottie Animation, Lottie File, Bodymovin

A small file format for vector animation. Apps and sites play it live, sharp at any size.

Think of it like

It is like sheet music for a cartoon. The file tells the player what to draw, so it stays small.

Example

A food app shows a Lottie of a bike riding along while your order is on its way. The file is only 30 KB.

Why it matters

Designers can hand finished motion to coders as one file. Nobody has to rebuild it in code.

Definition

Lottie is a file format and a set of players for vector animation. A designer makes the animation, often in After Effects, and exports it as a small JSON file. Apps and websites then play that file and draw it live. It stays sharp at any size and is much smaller than a video. Airbnb shared the players as free, open source code in 2017.

Example code

javascript
lottie.loadAnimation({
  container: document.getElementById("hero"),
  renderer: "svg",
  loop: true,
  path: "/animations/wave.json",
});
The page loads the file and plays it on a loop in the hero box.
A Lottie file stores keyframes like these, and the app draws the frames between.

Common mistake

Using effects the players cannot draw. Some After Effects features do not export, so test early.

Key takeaways

  1. 1
    Vector, not video. Sharp at any size.
  2. 2
    A small JSON file. Much lighter than video.
  3. 3
    Test the export. Not every effect survives.

Compare