npm install react-native-gesture-handler

Experimental implementation of a new declarative API for gesture handling in react-native

About react-native-gesture-handler

React Native Gesture Handler is an essential tool for developers looking to build seamless and interactive user interfaces in their React Native applications. This npm package is expertly designed to simplify the implementation of gesture handling, offering a more declarative and accessible approach compared to traditional methods. By utilizing React Native Gesture Handler, developers can enhance the responsiveness of their applications, enabling a smoother, more intuitive interaction for users. This package supports a wide array of gestures, such as taps, swipes, drags, and pinches, making it a versatile choice for any mobile application aiming to deliver a top-tier user experience.

To integrate React Native Gesture Handler into your project, the process begins with the simple command npm install react-native-gesture-handler. This command sets up the necessary dependencies and integrates the gesture handling capabilities directly into your React Native project, streamlining development and saving valuable coding time. The package ensures compatibility with both Android and iOS platforms, allowing for a unified codebase that performs consistently across different devices. Moreover, React Native Gesture Handler works seamlessly with other libraries in the React ecosystem, such as React Navigation, further enhancing its utility and making it a staple in modern mobile application development.

React Native Gesture Handler is continuously updated by Software Mansion, ensuring it stays at the forefront of technology, addressing both existing and emerging needs in mobile app development. This commitment to innovation and quality makes React Native Gesture Handler a reliable and future-proof choice for developers looking to implement advanced gesture handling in their applications.

More from software-mansion

software-mansion npm packages

Find the best node modules for your project.

Search npm

react-native-gesture-handler

Experimental implementation of a new declarative API for gesture handling in...

Read more
,

react-native-reanimated

More powerful alternative to Animated library for React Native...

Read more

Dependencies

Core dependencies of this npm package and its dev dependencies.

@egjs/hammerjs, hoist-non-react-statics, invariant, prop-types, @babel/core, @babel/plugin-proposal-class-properties, @babel/preset-env, @babel/preset-typescript, @babel/runtime, @react-native/babel-preset, @testing-library/jest-native, @testing-library/react-native, @types/hammerjs, @types/hoist-non-react-statics, @types/jest, @types/react, @types/react-test-renderer, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, babel-jest, clang-format, eslint, eslint-config-satya164, eslint-import-resolver-babel-module, eslint-plugin-import, eslint-plugin-jest, expo, husky, jest, lint-staged, madge, prettier, react, react-dom, react-native, react-native-builder-bob, react-native-reanimated, react-native-web, react-test-renderer, release-it, typescript

Documentation

A README file for the react-native-gesture-handler code repository. View Code

React Native Gesture Handler by Software Mansion

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 JS 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.

Installation

Check getting started section of our docs for the detailed installation instructions.

Fabric

To learn how to use react-native-gesture-handler with Fabric architecture, head over to Fabric README. Instructions on how to run Fabric Example within this repo can be found in the FabricExample README.

Documentation

Check out our dedicated documentation page for info about this library, API reference and more: https://docs.swmansion.com/react-native-gesture-handler/docs/

Examples

If you want to play with the API but don't feel like trying it on a real app, you can run the example project. Clone the repo, go to the example folder and run:

yarn install

Run yarn start to start the metro bundler

Run yarn android or yarn ios (depending on which platform you want to run the example app on).

You will need to have an Android or iOS device or emulator connected.

React Native Support

version react-native version
2.16.0+ 0.68.0+
2.14.0+ 0.67.0+
2.10.0+ 0.64.0+
2.0.0+ 0.63.0+
1.4.0+ 0.60.0+
1.1.0+ 0.57.2+
<1.1.0 0.50.0+

It may be possible to use newer versions of react-native-gesture-handler on React Native with version <= 0.59 by reverse Jetifying. Read more on that here https://github.com/mikehardy/jetifier#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries

License

Gesture handler library is licensed under The MIT License.

Credits

This project has been build and is maintained thanks to the support from Shopify, Expo.io and Software Mansion

shopify expo swm

Community Discord

Join the Software Mansion Community Discord to chat about Gesture Handler or other Software Mansion libraries.

Gesture Handler is created by Software Mansion

Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.