GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

05Long-press gate — splitting scroll from drag with a hold timer and a movement threshold

Starting a timer on pointerdown means drag mode only activates once a set duration (say 250ms) has elapsed, and if accumulated pointermove distance crosses a threshold before that, it's read as a scroll intent and the timer is cancelled. If pointercancel arrives before the timer fires, it simply ends as a tap.

Best forMobile list reordering

setTimeoutpointermovepointercancel
Long-press gate — splitting scroll from drag with a hold timer and a movement threshold
Open in a new tab

05 Long-press gate — splitting scroll from drag with a hold timer and a movement threshold — Measured area 21.082% · moving frames 16/23Original by GODRICH · SCSS and React ship in the zip · Drag to Reorder UI: 9 Lists, One Drop Index

The post this demo lives in

Drag to Reorder UI: 9 Lists, One Drop Index - preview of all 9 demosDrag to Reorder UI: 9 Lists, One Drop IndexDrag to reorder UI: Computing the drop index from pointer position reorders lists, kanban boards and grids -- with long- See all demos in this post

If you like this effect - similar demos