Animation & Timing
useTween
A hook that returns a tweened value from 0 to 1 over a specified duration.
useTween
useTween is a hook that returns a tweened value from 0 to 1 over a specified duration. It uses requestAnimationFrame for smooth animations.
Usage
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| duration | number | 200 | Duration of the tween in milliseconds. |
| easing | (t: number) => number | Easing.linear | Easing function to use. |
Return Value
Returns a number between 0 and 1.