Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Vue.js
  3. vue-masonry

vue-masonry

MITJavaScriptv0.16.0

A Vue.js directive for creating masonry grid layouts using the Masonry library.

GitHubGitHub
687 stars82 forks0 contributors

What is vue-masonry?

vue-masonry is a Vue.js plugin that provides directives for creating masonry grid layouts. It wraps the Masonry JavaScript library to offer a Vue-friendly way to build dynamic, Pinterest-style layouts where elements are arranged in an optimal vertical flow based on available space.

Target Audience

Vue.js developers who need to implement masonry grid layouts in their applications, particularly those building image galleries, product grids, or content feeds with variable-height items.

Value Proposition

Developers choose vue-masonry because it provides a declarative, Vue-native API for masonry layouts while maintaining full compatibility with the original Masonry library's features, eliminating the need to manually manage Masonry instances in Vue components.

Overview

💠 Vue.js directive for masonry blocks layouting ✅

Use Cases

Best For

  • Building Pinterest-style image galleries in Vue applications
  • Creating dynamic product grids with variable-height items
  • Implementing masonry layouts in Nuxt.js projects with SSR
  • Adding responsive masonry grids to Vue-based content feeds
  • Integrating masonry layouts with CSS frameworks like Tailwind CSS
  • Managing complex grid layouts where elements have different heights

Not Ideal For

  • Projects requiring full server-side rendering without any client-side JavaScript, as vue-masonry depends on the Masonry library which runs on the client.
  • Teams wanting pre-styled, drop-in masonry components out of the box, since it provides only layout directives and requires custom CSS for styling.
  • Applications with highly dynamic content needing automatic layout updates, due to the manual $redrawVueMasonry() requirement.
  • Developers preferring modern CSS-only solutions like Grid or Flexbox for performance, as vue-masonry adds JavaScript overhead and external dependencies.

Pros & Cons

Pros

Declarative Vue Integration

Provides v-masonry and v-masonry-tile directives for a native Vue experience, eliminating manual Masonry instance management as shown in the template examples.

Full Masonry Feature Support

Supports all key Masonry options like column-width, gutter, and stagger, allowing fine-tuned control over layouts, as detailed in the properties section.

Vue 2 and 3 Compatibility

Works with both major Vue versions, with specific integration instructions for each, including Vue 3 setup with mitt for older versions.

Nuxt SSR Readiness

Includes clear guidance for server-side rendering with Nuxt using vue-client-only, making it viable for SSR projects, as outlined in the NUXT section.

Cons

External Dependency Requirement

Relies on the original Masonry library being loaded separately, which complicates setup and can lead to version conflicts, as noted in the installation steps.

Manual Redraw Necessary

Developers must explicitly call $redrawVueMasonry() for layout updates when content changes, which is error-prone and adds maintenance overhead.

Complex Vue 3 Setup

For versions earlier than 0.14.0, Vue 3 integration requires additional configuration with the mitt package, increasing setup complexity and potential for misconfiguration.

Breaking Changes History

Has experienced API instability, such as the method change from Vue.redrawVueMasonry() to this.$redrawVueMasonry(), which can break existing codebases, as mentioned in known issues.

Frequently Asked Questions

Quick Stats

Stars687
Forks82
Contributors0
Open Issues16
Last commit3 years ago
CreatedSince 2017

Tags

#layout#grid-layout#vue3#vue-plugins#masonry-layout#frontend#vuejs#ui-components#masonry#vue#vue-directive#responsive-design

Built With

V
Vue.js
J
JavaScript

Included in

Vue.js73.6k
Auto-fetched 1 day ago

Related Projects

vue-virtual-scrollervue-virtual-scroller

⚡️ Blazing fast scrolling for any amount of data

Stars10,797
Forks975
Last commit12 days ago
vue-grid-layoutvue-grid-layout

A draggable and resizable grid layout, for Vue.js.

Stars7,405
Forks1,526
Last commit2 years ago
vue-virtual-scroll-listvue-virtual-scroll-list

⚡️A vue component support big amount data list with high render performance and efficient.

Stars4,503
Forks593
Last commit2 years ago
splitpanessplitpanes

A Vue 3 (and 2) reliable, simple and touch-ready panes splitter / resizer.

Stars2,252
Forks190
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub