use-long-press
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

React Long Press Hook

codecov npm type definitions npm bundle size npm

Logo horizontal

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

Package Sidebar

Install

npm i use-long-press

Weekly Downloads

28,245

Version

3.2.0

License

MIT

Unpacked Size

18.8 kB

Total Files

10

Last publish

Collaborators

  • minwork