React Native Gesture Handler is a declarative library that exposes the platform's native touch and gesture system to React Native, enabling smooth, deterministic gesture handling on the UI thread. It manages gesture recognition through a native state machine with defined transitions between states like BEGAN, ACTIVE, END, and CANCELLED, routing touch events through platform-native gesture recognizers on both iOS and Android.
The library provides a comprehensive gesture composition framework that allows developers to combine multiple gestures into race, simultaneous, or exclusive sequences, controlling activation order and preventing conflicts across components. It supports a wide range of gesture types including pan, pinch, rotation, tap, long press, fling, hover, and force touch, all detected natively. Gesture callbacks can execute as worklets on the UI thread for synchronous processing, and the library includes tools for gesture testing and simulation.
Beyond gesture recognition, the library offers a collection of native touchable components with platform-specific visual feedback like Android ripples and iOS highlights, as well as swipeable rows and drawers built with Reanimated for performant animations. Gesture detectors can be attached to any component via hooks or wrappers without modifying the native view hierarchy, including support for SVG elements and text spans.