Long press hook
  • Introduction
  • Installation
  • Basics
  • Advanced
    • Definition
    • Callback
    • Options
      • Configuration
        • Events detection
        • Long press threshold
      • React events
        • Persisting event
        • Filtering events
      • Callbacks
        • Press started
        • On move
        • Press finished
        • Long press cancelled
      • Cancellation
        • Cancel outside element
        • Cancel on movement
    • Hook result / Bind function
      • Context
      • Handlers
  • Examples
    • Advanced usage example
    • Live examples
      • Version 3
      • Version 2 (deprecated)
      • Version 1 (deprecated)
  • Migration
    • V1 to V2
    • V2 to V3
    • ⚠️V3.1+
    • Change log
  • Contributions
    • ❤️Donations
    • Pull requests policy
  • Architectural Decisions
    • V1 and V2 deprecation
    • Moving to new repository
Powered by GitBook
On this page
  • mouse
  • touch
  • pointer

Was this helpful?

  1. Advanced
  2. Hook result / Bind function

Handlers

PreviousContextNextAdvanced usage example

Last updated 1 year ago

Was this helpful?

Handlers are returned from in a form of an object which can be spread to react element. Contents of this object depend on value:

mouse

  • onMouseDown

  • onMouseMove

  • onMouseUp

  • onMouseLeave (only when is enabled)

touch

  • onTouchStart

  • onTouchMove

  • onTouchEnd

pointer

  • onPointerDown

  • onPointerMove

  • onPointerUp

  • onPointerLeave (only when is enabled)

bind function
detect option
cancelOutsideElement
cancelOutsideElement