useInfiniteAnimationGroup
Creates an InfiniteAnimationGroup container for continuous, lifecycle-owned looping animations — shimmer, pulse, spinners, breathing effects, loading dots. Each child loops between an explicit from and to, starts with the component, and stops when it unmounts.
Unlike target-settling APIs (useAnimatedValue, useAnimationGroup, Style.transition, AnimatedVisibility, AnimatedContent), infinite animations never settle, so they are kept separate: they accept only InfiniteAnimationSpecs built from duration-based specs and have no completion semantics.
val infinite = useInfiniteAnimationGroup()
val alpha = infinite.animateFloat(from = 0.5f, to = 1f, animation = tween(600.ms))
Dot(style = Style.alpha(alpha))Mirrors useAnimationGroup's pure-render / commit-time construction: render() only describes the loops (allocating no AnimatedValue and mutating nothing), so concurrent resolves cannot race; the long-lived values are created in InfiniteAnimationGroupState.reconcile on the main thread.
Parameters
Whether the loops advance. false unregisters the children and holds their current values; flipping back to true restarts each loop from its from (a stop/hold + restart, not an elapsed-time pause/resume). Wire this to visibility to avoid an always-on frame loop off-screen.
Optional label for debugging/tracing.