@masonry-grid/vanilla
RegularMasonryGrid
Section titled “RegularMasonryGrid”Standard masonry layout that stacks items by pulling them up to fill gaps.
import { RegularMasonryGrid } from '@masonry-grid/vanilla'
const grid = new RegularMasonryGrid(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()