Quantcast
Channel: Animation — SitePoint
Viewing all articles
Browse latest Browse all 15

Getting Started with Lottie.js

$
0
0

About 10 years ago web animation was in big trouble. Adobe Flash was dying but there was still no obvious replacement. We needed a fast, easy-to-author, web-friendly format capable of staging larger-scale animated demos, cartoons, and banners.

Happily, in 2014 AirBnB offered us their solution – Lottie.

What is Lottie?

Lottie.js is an open-source vector-based animation format created by AirBnB Experience and Motion Designer, Salih Abdul-Karim. The Lottie engine was designed to render fast, crisp, low-bandwidth vector animations identically on Web, iOS, Android, Windows and React Native. In short, if you enjoy using SVG for your imagery, Lottie is a great way to animate those vector graphics.

Lottie in action: Popeye the Sailor Man by Bashir Ahmed

As Bashir Ahmed's beautiful example above demonstrates, Lottie can produce character-rich, lithe, fluid movement from tiny files – this animation is generated from a 54kb file.

At their most basic, Lottie animations like Bashir's require just two files.

  1. The Lottie animation player (Lottie.js)
  2. The JSON animation instructions file

Why would I choose Lottie?

There are many ways to animate web vectors – from CSS animations to SVG’s SMIL to GreenSock, AnimeJS, and other JavaScript libraries.

However, Lottie has a killer ‘one-two punch’ of:

  • a growing ecosystem of high-quality visual animation tools
  • the ability to export smooth, fast, efficient, scriptable animations

For all its well-documented problems, Adobe Flash's long reign was based on combining a good authoring tool with easy cross-platform deployment. I think Lottie shares some of Flash’s advantages.

The post Getting Started with Lottie.js appeared first on SitePoint.


Viewing all articles
Browse latest Browse all 15

Trending Articles