as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

react-native-gesture-handler

The @amazon-devices/react-native-gesture-handler library 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 the best possible touch-based experiences in React Native.

With this library, the JavaScript responder system no longer controls gestures, but instead, gestures are recognized and tracked in the UI thread. This library makes touch interactions and gesture tracking not only smooth, but also dependable and deterministic.

This library is system-deployed and available to React Native for Vega apps without a separate installation process. The library is autolinking, which your app links to at runtime. The library is guaranteed to be compatible only with the version of React Native for Vega for which it's built.

When you uplevel your app's version of React Native for Vega, consider the best practice of upleveling its library dependencies.

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

  1. Add the JavaScript library dependency in the package.json file:

    Copied to clipboard.

    "dependencies": {
          ...
          "@amazon-devices/react-native-gesture-handler": "~2.0.0"
    }
    
  2. Reinstall package-lock.json file using the npm install command.

API reference

Gesture-Handler library on Vega adds a support for all gesture types and native components listed in the official documentation.

Gestures

Gesture Type Description
Pan Continuous Recognizes a panning (dragging) gesture and track its movement.
Tap Discrete Recognizes one or many taps.
Long press Discrete Activates when the corresponding view is pressed for a sufficiently long time.
Rotation Continuous Recognizes a rotation gesture and tracks its movement.
Pinch Continuous Recognizes the pinch gesture and tracks the distance between two fingers. This handler uses that information to scale or zoom your content.
Fling Discrete Activates when the movement is sufficiently long and fast.
Manual Plain 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 that provides native components that can act as buttons. These components can be a replacement to TouchableHighlight or TouchableOpacity from the 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  

Supported Third-Party Libraries and Services.


Last updated: Sep 30, 2025