animate*AsState for Simple Tweens
Animate a single value automatically.
Animation, the Easy Way
Compose can animate changes for you. The simplest tool is the animate*AsState family, which smoothly moves a value from old to new. ✨
What animateDpAsState Does
When your target value changes, animateDpAsState returns a State that glides toward it over a few frames instead of jumping.
val size by animateDpAsState(targetValue = if (big) 200.dp else 100.dp)All lessons in this course
- animate*AsState for Simple Tweens
- AnimatedVisibility & Crossfade
- updateTransition for Coordinated Motion
- Gesture-Driven Animations