React Swipe Event Handler Hook
JSON →React Swipeable is a lightweight React hook, `useSwipeable`, designed to easily add swipe and touch event handling capabilities to any React component. It abstracts away the complexities of touch events, providing a consistent API for detecting various swipe directions (up, down, left, right), tap events, and customizable thresholds for swipe detection via the `delta` prop. The library is currently at version 7.0.2 and is actively maintained by FormidableLabs, with regular updates to support new React versions (e.g., React 19) and introduce new features like `swipeDuration` and `onSwipeStart`. Its key differentiators include its hook-based API, fine-grained control over touch event options, and a focus on performance by leveraging passive event listeners by default, addressing Lighthouse performance issues related to touch events.
Traffic · last 30 days ↓89% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇸🇬 Singapore