Skip to content

Instantly share code, notes, and snippets.

View bharath914's full-sized avatar
🚩

Bharath Prakash bharath914

🚩
View GitHub Profile
@bharath914
bharath914 / cardanimation.kt
Created April 13, 2024 04:31
Quick Card Animation in Jetpack Compose
val animatable = remember {
Animatable(0.5f)
}
LaunchedEffect(key1 = true) {
animatable.animateTo(1f, tween(350, easing = FastOutSlowInEasing))
// you can tweak out and customize these animations.
}
// add this animatable to your card's modifier graphics layer.
BookItem(modifier = cardMod.graphicsLayer {
this.scaleX = animatable.value