expandHorizontally

@Stable
fun expandHorizontally(animationSpec: FiniteAnimationSpec<Dimension> = DEFAULT_SIZE_SPRING, expandFrom: Alignment.Horizontal = Alignment.End, clip: Boolean = true, initialWidth: (fullWidth: Int) -> Int = { 0 }): EnterTransition

Expands the width the content is given, from initialWidth to the content's full width, keeping the full height. The content is centered vertically.

Return

the enter transition.

Parameters

animationSpec

how the width travels, a medium-low stiffness spring by default.

expandFrom

the edge the width grows from, the trailing one by default. Any alignment other than Alignment.Start and Alignment.End centers the content horizontally.

clip

whether to clip content to the animated space; true by default.

initialWidth

the width the content starts in, given its full width; 0 by default.