HorizontalExpandingText

fun HorizontalExpandingText(text: String, colour: Color, style: TextStyle, modifier: Modifier = Modifier, maxLines: Int = 1, overflow: TextOverflow = TextOverflow.Clip)

Text component that appears/hides with an horizontal expansion animation effect.

The text will slide in from the left, expand horizontally, and fade in when visible, and slide out, shrink, and fade out when not visible. The sliding effect is dynamic, based on the width of the text.

Parameters

text

The text to display.

colour

The color of the text.

style

The TextStyle to apply to the text.

modifier

A Modifier to apply to the Text composable.

maxLines

Maximum number of lines for the text.

overflow

Defines how the text should handle overflow when the text is too long.


fun HorizontalExpandingText(text: AnnotatedString, color: Color, style: TextStyle, modifier: Modifier = Modifier, maxLines: Int = 1, overflow: TextOverflow = TextOverflow.Clip)

Text component that appears/hides with an horizontal expansion animation effect.

The text will slide in from the left, expand horizontally, and fade in when visible, and slide out, shrink, and fade out when not visible. The sliding effect is dynamic, based on the width of the text.

Parameters

text

The text to display.

color

The color of the text.

style

The TextStyle to apply to the text.

modifier

A Modifier to apply to the inner Text composable.

maxLines

Maximum number of lines for the text.

overflow

Defines how the text should handle overflow when the text is too long.