React Long Press Hook
React hook for detecting click / tap / point and hold event
Main features
- Mouse, Touch and Pointer events support
- Pass custom context and access it in callback
- Cancel long press if moved too far from the target
- Flexible callbacks:
onStart
,onMove
,onFinish
,onCancel
- Disable hook when necessary
- Filter undesired events (like mouse right clicks)
Documentation
Full documentation can be found here
Support
If you like my work, consider making a donation through Github Sponsors.
License
MIT © minwork