React Native decorators for adding pan and swipe gesture recognition to components with minimal code.
React Native Gesture Recognizers is a library that provides decorators for adding pan and swipe gesture recognition to React Native components. It simplifies handling touch interactions by wrapping components with configurable gesture logic, eliminating the need for manual touch event management. The library offers fine-grained control over gesture detection, including thresholds, directions, and callbacks.
React Native developers building mobile applications that require interactive touch-based features, such as draggable elements, swipeable cards, or gesture-driven navigation.
Developers choose this library for its declarative decorator approach, which reduces boilerplate code and integrates seamlessly with React Native's component lifecycle. It offers a lightweight alternative to more complex gesture libraries, with straightforward configuration and reliable gesture detection.
Gesture recognizer decorators for react-native
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses decorators to encapsulate gesture logic, allowing developers to add pan and swipe interactions with minimal boilerplate code, as shown in the basic examples where components are simply decorated.
Offers configurable options like horizontal/vertical detection, velocity thresholds, and directional controls for swipes, enabling precise customization of gesture behavior without low-level touch handling.
Provides props like panDecoratorStyle and swipeDecoratorStyle to apply custom styles directly to the gesture wrapper, simplifying UI adjustments and avoiding ghost panning issues.
Includes features such as resetPan to reset gesture state and setGestureState for performance optimization, reducing manual touch event management overhead.
Only handles pan and swipe gestures; lacks common multi-touch gestures like pinch or rotate, which are essential for many interactive mobile apps, forcing developers to seek additional libraries.
Relies on class decorators, which are not aligned with modern React Native practices using hooks, making integration with functional components cumbersome and potentially limiting adoption in newer projects.
The setGestureState prop indicates potential performance issues, as managing gesture state internally might impact responsiveness in animation-heavy applications, especially with continuous callbacks.
As admitted in the README, gestures can interfere with each other, and combining them requires additional wrapping, limiting complex interaction designs until planned improvements are implemented.