diff --git a/README.md b/README.md index 00061b2..02d6cbb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ Add Animatable Material Components in Android Jetpack Compose. Create jetpack compose animations painless. +What you can create from Material 3 components right now; +* Text Animation +* Box Animation +* Card Animation +* Icon Animation +* and combinations + ## How it looks    @@ -336,12 +343,12 @@ Box(
-State +States
```kotlin -// Simply create shared state and pass it to AnimatableCard and AnimatableText +// Simply create card state and text state val animatableCardState = rememberAnimatableCardState( initialSize = DpSize(width = 50.dp, height = 25.dp), targetSize = DpSize(width = 300.dp, height = 150.dp), @@ -355,6 +362,7 @@ val animatableTextState = rememberAnimatableTextState( targetFontSize = 36.sp, toTargetFontSizeAnimationSpec = spring(Spring.DampingRatioHighBouncy, Spring.StiffnessVeryLow) ) +// Merge the states you created into sharedState and pass it to AnimatableCard and AnimatableText val sharedAnimatableState = rememberSharedAnimatableState( listOf( animatableCardState, @@ -364,7 +372,7 @@ val sharedAnimatableState = rememberSharedAnimatableState( ```
-Component +Components
@@ -377,12 +385,12 @@ Box( ) { AnimatableCard( modifier = Modifier.size(100.dp), - state = sharedAnimatableState + state = sharedAnimatableState // pass shared state ) { Box(Modifier.fillMaxSize(), Alignment.Center) { AnimatableText( text = "Animatable", - state = sharedAnimatableState + state = sharedAnimatableState // pass shared state ) } }