Skip to content

Horizontal Compaction

The compactor decides which direction items move when the layout contains gaps. horizontalCompactor moves them toward earlier columns; verticalCompactor moves them toward earlier rows.

Try it: Switch the compaction direction, then drag an item away from its current position. The remaining items fill the gap along the selected axis.

Live demo

Released under the MIT License.