Passed in to tap event handlers like onTap the TapInfo object contains information about the tap gesture such as it‘s location.

function onTap(event, info) {
console.log(info.point.x, info.point.y)
}

<motion.div onTap={onTap} />
interface TapInfo {
    point: Point;
}

Properties

Properties

point: Point

Contains x and y values for the tap gesture relative to the device or page.

function onTapStart(event, info) {
console.log(info.point.x, info.point.y)
}

<motion.div onTapStart={onTapStart} />

Generated using TypeDoc