framer-motion
Version:
A simple and powerful React animation library
14 lines (13 loc) • 380 B
TypeScript
import { MotionValue } from ".";
/**
* Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
*
* ```javascript
* const x = useMotionValue(0)
* const xVelocity = useVelocity(x)
* const xAcceleration = useVelocity(xVelocity)
* ```
*
* @public
*/
export declare function useVelocity(value: MotionValue<number>): MotionValue<number>;