# @paper-folding/masonry-layout

> Cascading grid layout library

Latest version **5.0.8** (published 2024-09-18) · MIT license · 27 weekly downloads

## Install

```sh
npm install @paper-folding/masonry-layout
pnpm add @paper-folding/masonry-layout
yarn add @paper-folding/masonry-layout
bun add @paper-folding/masonry-layout
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.8 |
| Published | 2024-09-18 |
| First published | 2023-07-29 |
| Weekly downloads | 27 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 33.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paper Folding |
| Maintainers | paper-folding |
| Keywords | DOM, browser, grid, layout, outlayer |

## Links

- npm: https://www.npmjs.com/package/@paper-folding/masonry-layout
- Repository: https://github.com/Paper-Folding/masonry
- Homepage: https://masonry.desandro.com
- Issues: https://github.com/desandro/masonry/issues
- npm.io page: https://npm.io/package/@paper-folding/masonry-layout

## Dependencies (1)

- [@paper-folding/outlayer](https://npm.io/package/@paper-folding/outlayer.md) ^3.0.8

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 5.0.8 (latest) — 2024-09-18
- 5.0.7 — 2024-06-12
- 5.0.6 — 2024-06-11
- 5.0.5 — 2023-12-26
- 5.0.4 — 2023-11-17
- 5.0.3 — 2023-11-16
- 5.0.2 — 2023-11-16
- 5.0.1 — 2023-11-16
- 5.0.0 — 2023-11-14
- 4.2.2-hotfix.11 — 2023-11-11
- 4.2.2-hotfix.10 — 2023-11-10
- 4.2.2-hotfix.9 — 2023-11-10
- 4.2.2-hotfix.8 — 2023-11-10
- 4.2.2-hotfix.7 — 2023-11-10
- 4.2.2-hotfix.6 — 2023-10-04
- … 5 more at https://npm.io/package/@paper-folding/masonry-layout/versions

## README

# 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.

See [masonry.desandro.com](https://masonry.desandro.com) for complete docs and demos.

## Install

### Download

+ [masonry.pkgd.js](https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.js) un-minified, or
+ [masonry.pkgd.min.js](https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js) minified

### CDN

Link directly to Masonry files on [unpkg](https://unpkg.com/).

``` html
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.js"></script>
<!-- or -->
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
```

### 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

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

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

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](http://desandro.mit-license.org). Have at it.

* * *

Made by David DeSandro

---
_Source: https://npm.io/package/@paper-folding/masonry-layout · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
