Optional globalOptional whileProperties or variant label to animate to while the component is pressed.
<motion.div whileTap={{ scale: 0.8 }} />
Optional onCallback when the tap gesture successfully ends on this element.
function onTap(event, info) {
console.log(info.point.x, info.point.y)
}
<motion.div onTap={onTap} />
The originating pointer event.
An TapInfo object containing x and y values for the point relative to the device or page.
Optional onCallback when the tap gesture ends outside this element.
function onTapCancel(event, info) {
console.log(info.point.x, info.point.y)
}
<motion.div onTapCancel={onTapCancel} />
The originating pointer event.
An TapInfo object containing x and y values for the point relative to the device or page.
Optional onCallback when the tap gesture starts on this element.
function onTapStart(event, info) {
console.log(info.point.x, info.point.y)
}
<motion.div onTapStart={onTapStart} />
The originating pointer event.
An TapInfo object containing x and y values for the point relative to the device or page.
Generated using TypeDoc
If
true, the tap gesture will attach its start listener to window.Note: This is not supported publically.