Contains x and y values for the distance moved since
the last event.
function onPan(event, info) {
console.log(info.delta.x, info.delta.y)
}
<motion.div onPan={onPan} />
Contains x and y values for the distance moved from
the first pan event.
function onPan(event, info) {
console.log(info.offset.x, info.offset.y)
}
<motion.div onPan={onPan} />
Contains x and y values for the current pan position relative
to the device or page.
function onPan(event, info) {
console.log(info.point.x, info.point.y)
}
<motion.div onPan={onPan} />
Contains x and y values for the current velocity of the pointer, in px/ms.
function onPan(event, info) {
console.log(info.velocity.x, info.velocity.y)
}
<motion.div onPan={onPan} />
Generated using TypeDoc
Passed in to pan event handlers like
onPanthePanInfoobject contains information about the current state of the tap gesture such as itspoint,delta,offsetandvelocity.