expandHorizontally

fun expandHorizontally(spec: FiniteAnimationSpec<Float> = spring(), expandFrom: TransformOrigin = TransformOrigin.CenterStart): EnterTransition

Expands content horizontally by animating a clip rect from zero width to full width.

Parameters

spec

The animation spec for the expansion. Defaults to spring.

expandFrom

The anchor point that stays fixed during expansion.


fun expandHorizontally(duration: Duration, expandFrom: TransformOrigin = TransformOrigin.CenterStart): EnterTransition

Expands content horizontally over duration — a shortcut for expandHorizontally(tween(duration), expandFrom).

Parameters

duration

How long the expansion runs.

expandFrom

The anchor point that stays fixed during expansion.