AnimatedText

Composable Component

A composable that displays an animated text.

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

Parameters

textThe text to be displayed.
fontRegistryThe font registry to be used to animate the text.
progressFractionA 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.
modifierModifier to be applied to the composable.
contentAlignmentAlignment within the bounds of the Canvas.