dnd-kit: drag relative to mouse pointer instead of draggable

221 Views Asked by At

Using @dnd-kit/core the default behavior is to have the dragged element (and the div within the DragOverlay) be dragged relative to its original position. If I click and drag the Draggable at some offset from the origin of the Draggable, it will move relative to its original position with an offset according to the distance I have dragged the pointer.

How can I instead have the dragged item "jump" to the location of the pointer? The dragged item should be located directly below the pointer instead of relative to the original position.

0

There are 0 best solutions below