Component to detect finger gestures within the wrapped component. Following gestures are supported:
drag
, dragleft
, dragright
, dragup
, dragdown
hold
, release
swipe
, swipeleft
, swiperight
, swipeup
, swipedown
tap
, doubletap
pinch
, pinchin
, pinchout
touch
, transform
, rotate
<v-ons-gesture-detector>
<div id="detect-area" style="width: 100px; height: 100px;">
Swipe Here
</div>
</v-ons-gesture-detector>
<script>
document.addEventListener('swipeleft', function(event) {
if (event.target.matches('#detect-area')) {
console.log('Swipe left is detected.');
}
});
</script>
If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.
For bug reports and feature requests use our GitHub Issues page.