masonry-layout vs gridstack vs draggabilly vs muuri vs isotope-layout vs packery
JavaScript Layout and Drag-and-Drop Libraries Comparison
1 Year
masonry-layoutgridstackdraggabillymuuriisotope-layoutpackerySimilar Packages:
What's JavaScript Layout and Drag-and-Drop Libraries?

These libraries provide functionalities for creating dynamic layouts and enabling drag-and-drop interactions in web applications. They help developers build responsive and interactive user interfaces by allowing elements to be rearranged, resized, or moved within a grid or layout. Each library has its unique features and use cases, catering to different needs in web development, such as grid management, item positioning, and layout responsiveness.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
masonry-layout335,04216,587-857 years agoMIT
gridstack267,5738,0951.6 MB6725 days agoMIT
draggabilly87,7743,87583.6 kB18-MIT
muuri26,98510,8911 MB117-MIT
isotope-layout22,16311,096-737 years agoGPL-3.0
packery11,9094,215260 kB564 months agoMIT
Feature Comparison: masonry-layout vs gridstack vs draggabilly vs muuri vs isotope-layout vs packery

Drag-and-Drop Functionality

  • masonry-layout:

    Masonry Layout does not natively support drag-and-drop, but it can be combined with other libraries to achieve this functionality. It focuses primarily on arranging items in a masonry style, making it less flexible for drag-and-drop interactions.

  • gridstack:

    Gridstack offers built-in drag-and-drop capabilities for grid items, allowing users to rearrange widgets easily. It also supports resizing, making it ideal for dashboard applications where users can customize their layouts.

  • draggabilly:

    Draggabilly provides a straightforward drag-and-drop API that allows elements to be moved around the page. It is lightweight and does not impose any layout structure, making it easy to integrate into existing designs without heavy dependencies.

  • muuri:

    Muuri provides comprehensive drag-and-drop functionality, allowing items to be moved, sorted, and filtered easily. It is designed for high performance and supports complex interactions, making it suitable for dynamic applications.

  • isotope-layout:

    Isotope includes drag-and-drop support alongside its filtering and sorting features, allowing users to rearrange items dynamically. This makes it suitable for interactive galleries where users can customize the display of items.

  • packery:

    Packery supports drag-and-drop functionality, allowing users to rearrange items within a grid layout. It focuses on filling gaps efficiently while maintaining a fluid layout, making it a good choice for visually dynamic interfaces.

Layout Management

  • masonry-layout:

    Masonry Layout focuses on arranging items in a grid that adapts to varying heights, ensuring that gaps are minimized. It does not provide drag-and-drop functionality out of the box but can be enhanced with other libraries.

  • gridstack:

    Gridstack manages a grid layout where items can be placed, resized, and rearranged. It automatically handles the positioning of items, making it easy to create responsive layouts.

  • draggabilly:

    Draggabilly does not manage layouts itself; it simply enables drag-and-drop on existing elements. This makes it versatile but requires additional layout management if needed.

  • muuri:

    Muuri offers flexible layout management with support for both grid and masonry layouts. It allows for dynamic item positioning and reordering, making it suitable for complex applications that require a responsive design.

  • isotope-layout:

    Isotope provides layout management with advanced filtering and sorting capabilities, allowing items to be arranged dynamically based on user interactions. It adapts to various screen sizes and item dimensions effectively.

  • packery:

    Packery provides layout management similar to masonry but with added drag-and-drop capabilities. It efficiently fills gaps in the layout while allowing users to rearrange items interactively.

Performance

  • masonry-layout:

    Masonry Layout is efficient in arranging items but may require optimization for performance in large datasets. It focuses on minimizing gaps but does not handle drag-and-drop natively, which can affect overall performance.

  • gridstack:

    Gridstack is optimized for performance with a focus on grid layouts. It efficiently manages multiple draggable items, ensuring smooth interactions even with many widgets on the screen.

  • draggabilly:

    Draggabilly is lightweight and performs well for simple drag-and-drop tasks. However, it does not handle complex layouts, so performance may vary based on how it is integrated into larger applications.

  • muuri:

    Muuri is built for high performance, supporting complex layouts and interactions without significant lag. It is optimized for modern browsers and can handle large datasets effectively.

  • isotope-layout:

    Isotope is designed for performance with features like smart filtering and sorting. It efficiently handles dynamic layouts, but performance can be impacted with a large number of items if not optimized properly.

  • packery:

    Packery is designed for performance with a focus on filling gaps in layouts. It performs well with draggable items but may require careful management of large numbers of items to maintain smooth interactions.

Customization

  • masonry-layout:

    Masonry Layout allows for some customization in terms of item sizes and spacing but is primarily focused on the masonry layout itself. It is less flexible for drag-and-drop interactions without additional libraries.

  • gridstack:

    Gridstack offers extensive customization options for grid layouts, allowing developers to define item sizes, positions, and behaviors. This makes it highly flexible for dashboard-style applications.

  • draggabilly:

    Draggabilly allows for basic customization of drag-and-drop behavior but does not provide extensive options for layout management. It is best for simple use cases where minimal customization is needed.

  • muuri:

    Muuri is highly customizable, allowing developers to define item behaviors, animations, and layout styles. Its flexible API makes it suitable for a wide range of applications requiring dynamic layouts.

  • isotope-layout:

    Isotope provides a high degree of customization for filtering, sorting, and layout arrangements. Developers can create unique user experiences tailored to specific needs, making it versatile for various applications.

  • packery:

    Packery offers customization options for item positioning and layout behavior, allowing developers to create unique grid arrangements. It is designed to be flexible while maintaining efficient gap filling.

Use Cases

  • masonry-layout:

    Masonry Layout is suitable for content-heavy applications like blogs or portfolios where items of varying heights need to be displayed without gaps. It is ideal for visually rich interfaces that prioritize aesthetics.

  • gridstack:

    Gridstack is perfect for dashboard applications where users can customize their views by dragging and resizing widgets. It is well-suited for applications that require a grid-based layout with user interactivity.

  • draggabilly:

    Draggabilly is ideal for applications that require simple drag-and-drop features, such as image galleries or interactive lists where users can reorder items without complex layout management.

  • muuri:

    Muuri is versatile and can be used for complex applications requiring dynamic layouts, such as Kanban boards or interactive dashboards where items need to be rearranged frequently.

  • isotope-layout:

    Isotope is best for galleries, portfolios, and any application where items need to be filtered and sorted dynamically. It provides a visually appealing layout that adapts to user interactions effectively.

  • packery:

    Packery is great for applications that require a fluid layout with draggable items, such as creative portfolios or product showcases, where maintaining a visually appealing arrangement is essential.

How to Choose: masonry-layout vs gridstack vs draggabilly vs muuri vs isotope-layout vs packery
  • masonry-layout:

    Choose Masonry Layout if you want a simple and effective way to create a grid layout that adapts to varying item sizes. It is great for Pinterest-style layouts where items can be of different heights, and you want to fill the gaps efficiently without complex interactions.

  • gridstack:

    Opt for Gridstack if you require a grid-based layout with draggable and resizable widgets. It is particularly useful for dashboard-like interfaces where users can customize their views by rearranging and resizing elements on the grid.

  • draggabilly:

    Choose Draggabilly if you need a lightweight and simple drag-and-drop solution that can be easily integrated into existing layouts without complex dependencies. It is ideal for projects where you want to add drag-and-drop functionality to specific elements without a full layout management system.

  • muuri:

    Consider Muuri if you need a highly customizable layout library that supports drag-and-drop, sorting, and filtering with a focus on performance. It is suitable for applications that require a combination of dynamic layouts and user interactivity, offering a flexible API for advanced use cases.

  • isotope-layout:

    Select Isotope if you need advanced filtering and sorting capabilities along with a masonry layout. It is perfect for galleries and portfolios where items can be dynamically filtered and rearranged based on user interactions, providing a visually appealing layout.

  • packery:

    Use Packery if you want a grid layout that allows for draggable items with a focus on filling gaps efficiently. It combines features of masonry and grid layouts, making it ideal for applications where you want a fluid layout while maintaining drag-and-drop capabilities.

README for masonry-layout

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 for complete docs and demos.

Install

Download

CDN

Link directly to Masonry files on unpkg.

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

Initialize

With jQuery

$('.grid').masonry({
  // options...
  itemSelector: '.grid-item',
  columnWidth: 200
});

With vanilla JavaScript

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

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


Made by David DeSandro