as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
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 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. Select the tab for your React Native version.
  1. Reinstall package-lock.json file using the npm install command.

Examples

Detecting single and double tapping.
Moving the box with Pan gesture handler.

Supported APIs

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

Gesture types

Native components

Additional Resources

For information on more libraries, see Supported Third-Party Libraries and Services.
最后修改于 2026年7月21日