Dnd grid

Resizable drag-and-drop grid built on dnd-grid

Eight tiles on a recessed four-column board. Drag one to move it and the rest push out of the way, then compact upward; drag a corner to resize. A demo of dnd-grid, a library of mine.

The real problem is a feedback loop: the grid measures its container with a ResizeObserver, but resizing a tile changes the container, fires the observer, and re-lays out mid-gesture. The fix is to park incoming widths while a resize is in flight, then apply the last one.

Visit dnd-grid.com