React Native Gesture Handler
Declarative, native-driven touch and gesture handling for React Native, recognized on the UI thread.
Repository Health
Technical Analysis
React Native Gesture Handler replaces the JavaScript responder system with a declarative API that recognizes and tracks gestures directly on the native UI thread. Because touch handling never has to round-trip through the JS bridge, interactions stay smooth, deterministic, and responsive even when the JS thread is busy.
The library ships a rich gesture vocabulary — pan, pinch, rotation, tap, long-press, fling, hover, and more — that can be composed together, plus native-backed buttons, touchables, and drop-in replacements for common React Native components. It pairs naturally with Reanimated to build high-performance, fully native touch experiences.
What You Get
- A declarative Gesture API with GestureDetector for defining and composing recognizers
- A full set of built-in gestures: pan, pinch, rotation, tap, long-press, fling, hover, native, and manual
- Native-backed buttons and touchables (RectButton, BorderlessButton, TouchableOpacity, and more)
- First-class integration with Reanimated for UI-thread-driven animations
- Cross-platform support across iOS, Android, web, and macOS
Common Use Cases
- Building swipeable rows, drawers, and bottom sheets
- Implementing pinch-to-zoom and rotation on images or maps
- Creating draggable and reorderable list interfaces
- Wiring smooth, gesture-driven animations together with Reanimated
Under The Hood
Architecture - The library is split between a TypeScript surface in packages/react-native-gesture-handler/src and native implementations in Kotlin (Android), Objective-C++/Objective-C (iOS), and shared C++. The JS layer (src/handlers/gestures) defines composable Gesture objects — pan, pinch, rotation, tap, long-press, fling, hover, native, and manual — that are attached to views through a single GestureDetector. Gesture configuration is serialized down to the native RNGestureHandlerModule (with .web, .windows platform variants), where recognition and tracking happen on the UI thread; results flow back through an event receiver so gestures resolve without a JS-bridge round-trip.
Tech Stack - Written primarily in TypeScript (~58%) with Kotlin, Objective-C++, and C++ for the native modules. The package is built with react-native-builder-bob and tsc, managed in a Yarn 4 workspaces monorepo alongside example apps. It targets the three latest React Native minor releases and integrates optionally with Reanimated for worklet-driven animation.
Code Quality - The codebase is strongly typed with dedicated type files (typeUtils.ts, per-gesture prop types) and platform-specific file resolution (.web.ts, .android.tsx, .windows.ts). A Jest test suite lives under src/__tests__ with mocks in src/__mocks__, and the project enforces ESLint, Prettier, and a circular-dependency check via madge. Native formatting is gated through spotless and clang-format in CI.
API Design - The modern Gesture API is ergonomic and declarative: recognizers are created via a Gesture factory, configured with chained methods, composed with Race/Simultaneous/Exclusive relations, and attached with one GestureDetector. Extensive documentation, a versioned compatibility table, and a runnable example app lower the barrier, though the breadth of gestures, composition rules, and required root-view setup give it a moderate learning curve.
Used by 23 apps in this directory
Spacedrive
Collaboration · File Storage
One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.
Suna
AI Agents
Turn your company into a git repo — one config, one command center, a workforce of AI agents that runs the real work around the clock.
Supabase
Authentication · Databases · Developer Tools
The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.
superset
AI Code Assistants · AI Development
Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.
Tianji
Analytics · Monitoring
Replace Google Analytics, UptimeKuma, and Prometheus with one self-hosted platform that tracks websites, monitors uptime, and reports server health.