Napoleonic Political Magnificence

    react-native-gesture-view

    0.2.1 • Public • Published

    GestureView

    Detects swipes in any <View> element including the swipe direction.

    Usage

    You should use GestureView as a normal <View> element:

    render () {
      return (
        <GestureView onSwipeUp={this.onSwipeUp}>
          <Text>Swipe up for awesomeness</Text>
        </GestureView>
      )
    }

    Props

    • onSwipeUp an optional function that's triggered when the view detects a swipe to the up direction
    • onSwipeDown an optional function that's triggered when the view detects a swipe to the down direction
    • onSwipeLeft an optional function that's triggered when the view detects a swipe to the left direction
    • onSwipeRight an optional function that's triggered when the view detects a swipe to the right direction
    • onUnhandleSwipe an optional function that's triggered when the swipe was inside the threshold
    • swipeThreshold the amount of pixels that the swipe needs to have before being interpreted as a swipe. Defaults to 120
    • quadrantThreshold an angle that's computed into each quadrant, use it to make wider/narrowed quadrants. Defaults to 30

    Install

    npm i react-native-gesture-view

    DownloadsWeekly Downloads

    54

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    9.26 kB

    Total Files

    5

    Last publish

    Collaborators

    • alanhoff
    • bsiddiqui