@masonry-grid/vanilla
MasonryGrid
Section titled “MasonryGrid”Standard masonry layout that stacks items by pulling them up to fill gaps.
import { MasonryGrid } from '@masonry-grid/vanilla'
const grid = new MasonryGrid(container)
BalancedMasonryGrid
Section titled “BalancedMasonryGrid”Balanced masonry layout that reorders items inside rows to minimize overall grid height.
import { BalancedMasonryGrid } from '@masonry-grid/vanilla'
const grid = new BalancedMasonryGrid(container)
#destroy()
Section titled “#destroy()”Both MasonryGrid
and BalancedMasonryGrid
have destroy()
method that destroys the grid instance and cleans up all observers and styles.
grid.destroy()