2017 © Pedro Peláez
 

component masonry

Cascading grid layout library

image

desandro/masonry

Cascading grid layout library

  • Wednesday, July 4, 2018
  • by desandro
  • Repository
  • 504 Watchers
  • 13255 Stars
  • 22,920 Installations
  • HTML
  • 2 Dependents
  • 0 Suggesters
  • 2086 Forks
  • 18 Open issues
  • 7 Versions
  • 18 % Grown

The README.md

Masonry

Cascading grid layout library, (*1)

Masonry works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall. You’ve probably seen it in use all over the Internet., (*2)

See masonry.desandro.com for complete docs and demos., (*3)

Install

Download

CDN

Link directly to Masonry files on unpkg., (*4)

``` html , (*5)


### Package managers [npm](https://www.npmjs.com/package/masonry-layout): `npm install masonry-layout --save` Bower: `bower install masonry-layout --save` ## Support Masonry development Masonry has been actively maintained and improved upon for 8 years, with 900 GitHub issues closed. Please consider supporting its development by [purchasing a license for one of Metafizzy's commercial libraries](https://metafizzy.co). ## Initialize With jQuery ``` js $('.grid').masonry({ // options... itemSelector: '.grid-item', columnWidth: 200 });

With vanilla JavaScript, (*6)

``` js // vanilla JS // init with element var grid = document.querySelector('.grid'); var msnry = new Masonry( grid, { // options... itemSelector: '.grid-item', columnWidth: 200 });, (*7)

// init with selector var msnry = new Masonry( '.grid', { // options... });, (*8)


With HTML Add a `data-masonry` attribute to your element. Options can be set in JSON in the value. ``` html <div class="grid" data-masonry='{ "itemSelector": ".grid-item", "columnWidth": 200 }'> <div class="grid-item"></div> <div class="grid-item"></div> ... </div>

License

Masonry is released under the MIT license. Have at it., (*9)


Made by David DeSandro, (*10)

The Versions

04/07 2018

dev-master

9999999-dev https://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer

04/07 2018

v4.2.2

4.2.2.0 https://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer

30/12 2017

v4.2.1

4.2.1.0 https://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer

20/04 2017

v4.2.0

4.2.0.0 http://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer

16/08 2016

v4.1.1

4.1.1.0 http://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer

06/08 2016

dev-horizontal-order

dev-horizontal-order http://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer

27/04 2016

v4.1.0

4.1.0.0 http://masonry.desandro.com

Cascading grid layout library

  Sources   Download

MIT

library javascript grid dom browser layout outlayer