Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

masonry.js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

masonry.js

Cascading grid layout library

  • 3.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
89
increased by1.14%
Maintainers
1
Weekly downloads
 
Created
Source

Masonry

Cascading grid layout library

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.

For complete docs and demos, see masonry.desandro.com or masonryjs.com if you're lazy,

Install

A packaged source file includes everything you need to use Masonry.

Bower

If you are cool with the command line, install Masonry as a Bower package:

bower install masonry

Initialize

In JavaScript

var container = document.querySelector('#container');
var msnry = new Masonry( container, {
  // options...
  itemSelector: '.item',
  columnWidth: 200
});

In HTML

Add a class of js-masonry to your element. Options can be set in JSON in data-masonry-options.

<div class="js-masonry" data-masonry-options='{ "itemSelector": ".item", "columnWidth": 200 }'>
  <div class="item"></div>
  <div class="item"></div>
  ...
</div>

License

Masonry is released under the MIT license. Have at it.


Copyright :copyright: 2014 David DeSandro

Keywords

FAQs

Package last updated on 07 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc