useLongPress
Call a function when an element is pressed and held for a set time, with mouse or touch. Use it for context actions and hold-to-confirm buttons.
- Level
- Intermediate
- Since
- v1.0.0
import {useLongPress} from '@zenuilabs/react-hooks';Loading demo_
More in Interaction
InteractionAdvanceduseDraggableDrag an element with mouse, touch or pen, with axis locking, bounds and grid snapping. Arrow keys move the focused element, so dragging also works from the keyboard.InteractionIntermediateuseDropTurn an element into a drop target for files, text or links. Use it when you want to accept any kind of dragged content.InteractionIntermediateuseDropAreaTurn an element into a drop zone for files, with optional type filtering. Use it for upload areas.