Easily add high-quality animation to any native app with Lottie

By the folks at AirBnB:

Lottie is an iOS, Android, and React Native library that renders After Effects animations in real time, allowing apps to use animations as easily as they use static images.

Lottie uses a JSON file – generated by the BodyMovin plugin for After Effects as its source, and then renders it with no additional engineering effort.

Here’s a React-based example:

import React from 'react';
import Animation from 'lottie-react-native';

export default class BasicExample extends React.Component {
  componentDidMount() {
    this.animation.play();
  }

  render() {
    return (
      <Animation
        ref={animation => { this.animation = animation; }}
        style={{
          width: 200,
          height: 200,
        }}
        source={require('../path/to/animation.json')}
      />
    );
  }
}

I like this take on creating cross-platform animations, yet it requires one to create his/her animations using After Effects.

Lottie →
AirBnB Design: Introducing Lottie →

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.