1
2
3
4
5
6
7

◄ Sample 1 (default pack):

1
2
3
4
5
6
7

◄ Sample 2 (optimized pack):

1
4
5
6

Sample 3 (custom grid options): ►

A
B
C
D

Sample 4 (appendable pack ): ►

pkmx - JavaScript library for optimal blocks layout
Downloads:
pkmx.js
Version: 1.0
License: MIT
© Xantorohara
Options: cellWidth (default: 10) cellHeight (default: 10) optimize {none, 'larger-first'} liveAppend (default: false) cellVerticalAlign (top | middle | bottom) cellHorizontalAlign (left | center | right)
Methods: append(elements) repack()
Examples: Example 1 Example 2