[Compose] Breaking Change: Major Compose API Refactor (#1827)

This PR is a major update to the Lottie Compose APIs.
Notable changes:
* LottieAnimation composable now just takes a composition, progress as a Float, and base properties such as ImageAssetDelegate, mergePaths, etc.
* Animating the composition can be done either with a manual animation, gesture, etc or via the new animateLottieComposition() function or LottieAnimatable class.
* LottieAnimation contains overloads that make it easier to just pass in a LottieCompositionSpec or animation parameters and under the hood, it will wrap lottieComposition() and animateLottieComposition().

54 files changed
tree: efc5f3eeaf753e9773acfbbaf40c732454cf2cec
  1. .github/
  2. .gitignore
  3. .idea/
  4. After Effects Samples/
  10. README.md
  11. RELEASE.md
  12. build.gradle
  13. credentials.tar.gz
  14. decrypt.sh
  15. deploy_snapshot.sh
  16. gcloud_run.sh
  17. gcloud_setup.sh
  18. gifs/
  19. gradle.properties
  20. gradle/
  21. gradlew
  22. gradlew.bat
  23. issue-repro-compose/
  24. issue-repro/
  25. lottie-compose/
  26. lottie/
  27. post_pr_comment.js
  28. sample-compose/
  29. sample/
  30. secrets.tar.enc
  31. settings.gradle
  32. sign.sh
  33. upload_release.sh
  34. version.sh

Lottie for Android, iOS, React Native, Web, and Windows

Build Status

Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:


Lottie is maintained and improved on nights and weekends. If you use Lottie in your app, please consider sponsoring it to help ensure that we can continue to improve the project we love. Click the sponsor button above to learn more

Lead Sponsors

View documentation, FAQ, help, examples, and more at airbnb.io/lottie







Gradle is the only supported build configuration, so just add the dependency to your project build.gradle file:

dependencies {
  implementation 'com.airbnb.android:lottie:$lottieVersion'

The latest Lottie version is: lottieVersion

The latest stable Lottie-Compose version is: lottieVersion Click here for more information on Lottie-Compose.

Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.


Because development has started for Lottie Compose, Gradle, and the Android Gradle Plugin will be kept up to date with the latest canaries. This also requires you to use Android Studio Canary builds. Preview builds can be installed side by side with stable versions.