shrinkHorizontally
fun shrinkHorizontally(spec: FiniteAnimationSpec<Float> = spring(), shrinkTowards: TransformOrigin = TransformOrigin.CenterStart): ExitTransition
Shrinks content horizontally by animating a clip rect from full width to zero width.
Parameters
spec
The animation spec for the shrink. Defaults to spring.
shrinkTowards
The anchor point that stays fixed during shrink.
fun shrinkHorizontally(duration: Duration, shrinkTowards: TransformOrigin = TransformOrigin.CenterStart): ExitTransition
Shrinks content horizontally over duration — a shortcut for shrinkHorizontally(tween(duration), shrinkTowards).
Parameters
duration
How long the shrink runs.
shrinkTowards
The anchor point that stays fixed during shrink.