<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>

Props

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.