Buddy-Grid-Layout (React-Grid-Layout fork with top-left compacting) v1.4.4 Demo 6 - Dynamic Add/Remove

Based on nitesh619's solution for top-left compacting

This demo shows what happens when items are dynamically added and removed.

You can remove an item by clicking its "x", and add a new one with the button.

To further illustration RGL's capacities, this particular example is responsive. Trying resizing the window.

Displayed as [x, y, w, h]:
0: [0, 0, 2, 2]
1: [2, 0, 2, 2]
2: [4, 0, 2, 2]
3: [6, 0, 2, 2]
+: [8, 0, 2, 2]
0x
1x
2x
3x
Add +x