Hooks & Utilities
v1.0.0Added in 1.0.0
Press and hold on touch screens: pointer handlers that fire after a delay, cancel on scroll and swallow the click that follows.
Press and hold a message on a phone: it shrinks while you hold, then a reaction bar pops up and the phone buzzes where it can. Move your finger or scroll and nothing fires. With a mouse, right-click opens the same bar, or add mouse to pointerTypes in the playground to hold with the mouse too.
npx wingo-ui@latest add use-long-pressuseLongPress(react, { delay: 450, slop: 8 })Right-click a message to reactPress and hold a message to react