1.0.0 • Published 5 years ago

react-native-swipe-gestures-recognizer v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-native-swipe-gestures-recognizer

npm.ionpm.ionpm.ionpm.io

Installation

Open a Terminal in the project root and run:

yarn add react-native-gestures-recognizer

or if you use npm:

npm install react-native-gestures-recognizer

If you are using Expo, you are done.

If you don't use Expo, install and link react-native-gesture-handler.

Props

namerequireddefaultdescription
confignothe config object (todo)
onSwipenonullThe function that runs on every swipe and returns swipeDirection and PanGestureHandlerGestureEvent
onSwipeUpnonullThe function that runs when a SWIPE_UP is detected.
onSwipeLeftnonullThe function that runs when a SWIPE_LEFT is detected.
onSwipeRightnonullThe function that runs when a SWIPE_RIGHT is detected.
onSwipeDownnonullThe function that runs when a SWIPE_DOWN is detected.

Example

More complex examples can be found in the Example folder.

yarn
cd Example
yarn
yarn start