<GestureDetector />

Component to detect finger gestures within a wrapped element.

Usage

<GestureDetector
  onTap={() => console.log('tap')}
  onSwipeleft={() => console.log('swipe left')}
>
  <div style={{backgroundColor: 'pink', width: '100px', height: '100px'}}>
    Swipe Here
  </div>
</GestureDetector>
Name Type Description
onDrag func Called when the user drags in any direction. Optional.
onDragLeft func Called when the user drags left. Optional.
onDragRight func Called when the user drags right. Optional.
onDragUp func Called when the user drags up. Optional.
onDragDown func Called when the user drags down. Optional.
onHold func Called when the user holds. Optional.
onRelease func Called when the user releases. Optional.
onSwipe func Called when the user swipes in any direction. Optional.
onSwipeLeft func Called when the user swipes left. Optional.
onSwipeRight func Called when the user swipes right. Optional.
onSwipeUp func Called when the user swipes up. Optional.
onSwipeDown func Called when the user swipes down. Optional.
onTap func Called when the user taps. Optional.
onDoubleTap func Called when the user double taps. Optional.
onPinch func Called when the user pinches in or out. Optional.
onPinchIn func Called when the user pinches in. Optional.
onPinchOut func Called when the user pinches out. Optional.
onTouch func Called when the user touches. Optional.
onTransform func Called when the user transforms. Optional.
onRotate func Called when the user rotates. Optional.

Need Help?

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.