expandIn

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

Expands content in both directions by animating a clip rect from zero size to full size.

Parameters

spec

The animation spec for the expansion. Defaults to spring.

expandFrom

The anchor point that stays fixed during expansion.


fun expandIn(duration: Duration, expandFrom: TransformOrigin = TransformOrigin.TopStart): EnterTransition

Expands content in both directions over duration — a shortcut for expandIn(tween(duration), expandFrom).

Parameters

duration

How long the expansion runs.

expandFrom

The anchor point that stays fixed during expansion.