Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhirkevich authored Dec 12, 2023
1 parent 30049b3 commit 8df0dca
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
![badge-macOS](https://img.shields.io/badge/Platform-macOS-purple)
![badge-web](https://img.shields.io/badge/Platform-Web-blue)

Compose Multiplatform lottie animations. Library have similar APIs to [airbnb/lottie-compose](https://github.com/airbnb/lottie/blob/master/android-compose.md)
including play/stop, delayed finish, repeat mode, iterations
Compose Multiplatform lottie animations.

Small wrapper over [airbnb/lottie-compose](https://github.com/airbnb/lottie/blob/master/android-compose.md) and skottie with features like
play/stop, delayed finish, repeat/reverse, iterations.

# Installation
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.alexzhirkevich/compottie/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.alexzhirkevich/compottie)
Expand All @@ -22,6 +24,8 @@ dependencies {

# Usage

Basic usage:

```kotlin

val lottieData : String = // ... your lottie JSON
Expand All @@ -33,3 +37,19 @@ LottieAnimation(
modifier = Modifier.size(300.dp)
)
```

With manual progress control:
```kotlin
val composition = rememberLottieComposition(lottieData)

val progress = animateLottieCompositionAsState(composition)

LottieAnimation(
composition = composition,
progress = { progress.value },
modifier = Modifier.size(300.dp)
)
```



0 comments on commit 8df0dca

Please sign in to comment.