Module

useAnimationControls

Custom hook for animation controls

View Source hooks/useAnimationControls.js, line 1

Requires

  • module:react

Members

# static constant useAnimationControls

Custom hook for controlling animations

View Source hooks/useAnimationControls.js, line 27

Type Definitions

Object

# AnimationControls

Properties:
Name Type Description
isPlaying boolean

Whether the animation is currently playing

speed number

Current animation speed multiplier (1 = normal speed)

play function

Start/resume the animation

pause function

Pause the animation

reset function

Reset the animation to initial state

setSpeed function

Set animation speed (0.1 to 5.0)

toggle function

Toggle play/pause state

View Source hooks/useAnimationControls.js, line 9