use-gesture is a library developed by the pmndrs organization that provides utilities for binding rich mouse and touch events to components in both React and vanilla JavaScript environments. The library is written in TypeScript and serves as a foundational tool for implementing gesture-based interactions without requiring extensive boilerplate code. Its primary purpose is to simplify the process of capturing and responding to user input gestures, making it possible to set up complex interactions in just a few lines of code.
The library exports multiple specialized hooks for React applications, each designed to handle specific gesture types. These include useDrag for drag gestures, useMove for mouse movement tracking, useHover for mouse enter and leave events, useScroll for scroll event handling, useWheel for mouse wheel interactions, usePinch for pinch gestures, and useGesture as a multipurpose hook capable of handling multiple gesture types simultaneously. The library works particularly well when combined with animation libraries like react-spring, though it remains compatible with any animation solution developers choose to implement.
According to GitGenius activity tracking, the repository has experienced significant engagement with a median issue and pull request response latency of 0.0 hours, indicating rapid community responsiveness. Across 34 tracked items, the mean response latency was 8363.6 hours, reflecting the long-term nature of some discussions. The most active contributor tracked by GitGenius is dbismut with 30 recorded events, followed by CodeForcer with 4 events and Profesor08 with 3 events. Bug reports and TypeScript-related issues represent the most frequently labeled item types, with occasional requests for additional information from issue reporters.
The repository's classification spans multiple domains including React hooks, mouse and pointer event handling, touch interactions, keyboard inputs, and general web development. GitGenius has identified overlapping contributors between use-gesture and major repositories including microsoft/vscode, microsoft/typescript, and rust-lang/rust, suggesting the library attracts developers with experience across diverse technology stacks. The library's focus on pointer tracking, event management, and gesture handling positions it as a specialized tool within the broader React ecosystem for managing user interaction complexity.
The documentation is comprehensive, with a dedicated website at use-gesture.netlify.app providing detailed information about available gestures, gesture state management, configuration options, and frequently asked questions. The repository includes interactive CodeSandbox demonstrations showcasing practical applications such as draggable lists, card stacks, action sheets, infinite slideshows, viewpagers, and card zoom functionality. These examples illustrate the library's capability to handle both simple and complex gesture scenarios, from basic drag operations to sophisticated multi-touch interactions. The library emphasizes the importance of setting the CSS touch-action property on draggable elements to prevent conflicts with browser native scrolling on touch devices.