Composable Component

AnimatedText

A composable that displays an animated text.

AnimatedText

Android
@Composable
@RequiresApi(31)
public fun AnimatedText(
    text: String,
    fontRegistry: AnimatedTextFontRegistry,
    progressFraction: () -> Float,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.Center,
)

Parameters

text The text to be displayed.
fontRegistry The font registry to be used to animate the text.
progressFraction A provider for the current state of the animation. Provided value should be between 0f and 1f, but might go beyond in some cases such as overshooting spring animations.
modifier Modifier to be applied to the composable.
contentAlignment Alignment within the bounds of the Canvas.