react-native-gesture-handler
@amazon-devices/react-native-gesture-handler
is a declarative API exposing platform native touch and gesture system to React Native.
React Native Gesture Handler provides native-driven gesture management APIs for building best possible touch-based experiences in React Native.
With this library gestures are no longer controlled by the JavaScript responder system, but instead are recognized and tracked in the UI thread.
It makes touch interactions and gesture tracking not only smooth, but also dependable and deterministic.
This is a system-deployed library and is available to React Native for Vega apps without a separate installation process. It is deployed as an autolinking library which your app links to at runtime. Compatibility is guaranteed only between the library and the version of React Native for Vega for which it is built.
When you up level the version of React Native for Vega with which your app is built, it's a best practice to also uplevel the version of the library on which it is dependent.
For more information about this library and its API, see https://docs.swmansion.com/react-native-gesture-handler/docs/ in the official Software Mansion documentation.
Installation
- Add the JavaScript library dependency in the package.json file:
"dependencies": { ... "@amazon-devices/react-native-gesture-handler": "~2.0.0" }
- Reinstall package-lock.json file using
npm install
command.
Supported APIs
Gesture-Handler library on Vega adds a support for all gesture types and native components listed in the official documentation.
Gesture types
gesture type | description |
---|---|
Pan | A continuous gesture handler that can recognize a panning (dragging) gesture and track its movement. |
Tap | A discrete gesture handler that recognizes one or many taps. |
Long press | A discrete gesture handler that activates when the corresponding view is pressed for a sufficiently long time. |
Rotation | A continuous gesture handler that can recognize a rotation gesture and track its movement. |
Pinch | A continuous gesture handler that recognizes pinch gesture. It allows for tracking the distance between two fingers and use that information to scale or zoom your content. |
Fling | A discrete gesture handler that activates when the movement is sufficiently long and fast. |
Manual | A plain gesture that has no specific activation criteria nor event data set. The app developers must handle the state programmatically in their application logic using a gesture state manager. |
Native components
native component | description |
---|---|
RNGestureHandlerButton | Gesture handler library provides native components that can act as buttons. These can be treated as a replacement to TouchableHighlight or TouchableOpacity from RN core. |
Supported versions
Package name | Amazon NPM library version | Vega OS build number | Vega SDK version | Release notes |
---|---|---|---|---|
@amazon-devices/react-native-gesture-handler |
2.0.0+2.13.0 | OS 1.1 (201010435950) |
0.19 | |
@amazon-devices/react-native-gesture-handler |
2.0.0+2.13.0 | OS 1.1 (201010438050) |
0.20 |
Additional Resources
For information on additonal libraries, see Supported Third-Party Libraries and Services.
Last updated: Sep 30, 2025