Skip to content

useAnimatedValue

useAnimatedValue(target, opts?): number

Defined in: react/use-animation.ts:67

Drive a tween over [duration] whenever target changes, returning the current in-flight value. A thin React adapter over the framework-agnostic Tween engine — the same interpolation widgets use via Widget.animate, so motion is identical across bindings.

Use this to smoothly move a number (opacity, width, a scroll offset, a gauge reading) instead of snapping.

number

TweenOptions = {}

number