useAnimatedInt

fun ComponentScope.useAnimatedInt(targetValue: Int, spec: FiniteAnimationSpec<Int> = spring(), trigger: AnimationTrigger = AnimationTrigger.Immediate, label: String = "int"): Value<Int>

Animates an Int value, automatically starting a new animation whenever targetValue changes.

Return

A Value containing the current animated value.

Parameters

targetValue

The value to animate toward. Changes trigger new animations.

spec

The animation specification. Defaults to spring.

trigger

Controls when the animation begins receiving frame callbacks. Defaults to AnimationTrigger.Immediate.

label

Optional label for debugging and tracing attribution.