AnimatedCounterText

fun AnimatedCounterText(text: String, modifier: Modifier = Modifier, style: TextStyle = LocalTextStyle.current, color: Color = LocalContentColor.current, textAlign: TextAlign = TextAlign.Center)(source)

A text composable that animates value changes with a per-character vertical slide transition.

Each character animates independently: unchanged characters stay still, while changed characters slide in from the top (increasing) or bottom (decreasing). This produces an odometer/ticker effect where only the digits that change are animated.

Parameters

text

The current display text (e.g. "70%", "€120").

modifier

Modifier applied to the row container.

style

Text style for rendering each character.

color

Text color.

textAlign

Text alignment within the available space.