Overview
The react-ui-animate
library provides a powerful set of gesture hooks designed to simplify user interaction handling — whether it’s dragging cards, tracking mouse movement, listening to scrolls, or capturing wheel input for zooming or custom behavior.
These hooks are lightweight, declarative, and work with any DOM element or even the window. Each hook provides rich data like movement, velocity, offset, and the raw event object.
Available Gesture Hooks
Here's a list of the animation modifiers you can use:
- useDrag: Detects drag gestures with full control over movement, velocity, and direction.
- useMove: Tracks pointer movement without needing a press — great for hover effects.
- useScroll: Listens to native scroll events and provides detailed scroll dynamics.
- useWheel: Captures wheel/touchpad gestures with full delta, velocity, and offset tracking.