Get started with packery CDN

GPL-3.0 licensed

Packery is a library for creating efficient, touch-friendly, and customizable grid layouts.

  • bin-packing
  • layout
  • float
  • masonry
  • nogaps

Stable version


How to start using packery CDN

<!DOCTYPE html>
  <title>Get started with packery CDN -</title>
    .grid {
      display: flex;
      flex-wrap: wrap;
      margin: 0;
      padding: 0;
    .grid-item {
      width: 200px;
      height: 200px;
      background-color: #f1c40f;
      margin: 10px;
      text-align: center;
      line-height: 200px;
      font-size: 2em;
      color: #fff;
  <div id="grid" class="grid">
    <div class="grid-item">Item 1</div>
    <div class="grid-item">Item 2</div>
    <div class="grid-item">Item 3</div>
    <div class="grid-item">Item 4</div>
    <div class="grid-item">Item 5</div>
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
    $(function() {
        itemSelector: '.grid-item',
        columnWidth: '.grid-item'

All versions