Auto Scroll
makeAutoScroll automatically scrolls a container when the drag overlay center approaches its edges.
Demo
Drag an item near the top or bottom edge of the list to trigger auto-scroll.
Source
What's used
- ScrollList —
makeDroppable+makeAutoScroll(ref, { threshold: 60, speed: 1.5 })on the same element. The container border highlights whenisScrollingistrue. - SortItem —
makeDraggablewith[index, items]payload; shows placement indicators onisDragOver. suggestSort('vertical')— reorders items on drop.