Cascade.js
Simple minimalistic plugin for masonry-like layout. Lightweight (3kb minified) jQuery-free library, a successor of kudago/waterfall.js.
Demo
Usage
Browserify:
$ npm install cascade-layout
var cascade = require('cascade-layout');
You can also use it with native JS:
var cascade = new Cascade(element, options);
Or with jQuery:
$(elem).cascade(options);
Options
{
childrenSelector: null,
minWidth: 300,
autoResize: true
}
Methods
When using VanillaJS or CommonJS forms you can call the instance's reflow method to make Cascade redraw the elements
var cascadeItem = new Cascade(...);
cascadeItem.reflow()