/kottie

Render After Effects Animations Library - Compose Multiplatform

Primary LanguageKotlinApache License 2.0Apache-2.0

Kottie

Maven metadata URL Kotlin compose-jb-version

badge-Android badge-iOS badge-JVM badge-web

Compose Multiplatform animation library that parses Adobe After Effects animations. Inspired by Airbnb/Lottie

Kottie.Demo.mp4

Setup

Add the dependency in your common module's commonMain sourceSet

implementation("io.github.ismai117:kottie:latest_version")

Usage

Url

//

// Example 1

KottieAnimation(
  url = "https://lottie.host/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Xano3sW7sH.json",
  iterations = KottieConstants.IterateForever
)

// Example 2

KottieAnimation(
  url = "https://lottie.host/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Xano3sW7sH.json",
  iterations = 1,
  completed = {
    println("Animation Completed")
  }
)

File

// Example 1

KottieAnimation(
  fileName = resource("raw/auth_animation.json"),
  iterations = KottieConstants.IterateForever
)

// Example 2

KottieAnimation(
  fileName = resource("raw/auth_animation.json"),
  iterations = 1,
  completed = {                      
    println("Animation Completed") 
  }                                  
)