Masonry Gallery Layout Component for Vue.js

Masonry Gallery component depends on Vue.js which contains a beautiful layout for the flow of the waterfall and the effect of miniature hills. The component of the selection of openings allows you to interior tabs/external or media width in a conditional popup window.

Compared to other applications, there is no need to determine the display and height of the image in the returned data. A very suitable option for the controlled serial control of the elements or displaying random elements.

Must Read: Horizontal Sort Waterfall Layout Component for Vue.js

How to make use of it:


npm install vue-masonry-gallery --save


import VueWMasonryGallery from "vue-masonry-gallery";
export default {
  name: "app",
  components: {
<script src="path/to/vue/vue.js"></script>
<script src="path/to/VueMasonryGallery.js"></script>


widthNumberContainer width(px), default is 100% relative to parent element width, Due to the responsiveness, all its parent’s width must be 100% relative to the browser window at this time, See the example after the table
**If it is fixed width, you must set the width prop **, not just its parent element set a fixed width
heightNumber|StringContainer height, the default unit px for the value of the Number type, the unit can be specified when the value is the type of String
When you do not specify the height value, the default is relative to the height of the parent element 100%, then the parent element must have a height
gapNumber20[Pc] space between pictures(px)
mobileGapNumber8[Mobile] space between pictures(px)
Data used to render the masonry gallery stream
Each array element is an object and must have src and href attributes.
The src an attribute represents the SRC attribute of the picture
The href an attribute represents the link to click to jump
if your key is not src and href, you can use the two properties of srcKey and hrefKey to do the key value replacement.
randomBooleanfalseThe function of random display of items. The default option is ‘false’ – to run RANDOM sorting change it to ‘true’
srcKeyString‘src’When the key value of your picture address is not src, you can use this property to replace it.
hrefKeyString‘href’When the key value of your picture address is not href, you can use this property to replace it.
targetString‘blank’ ‘self’ ‘modal’A method of running a popup window that displays an image or redirects to an external URL
perPageNumber13The number of items displayed the first time you load the page.
imgWidthNumber330The width of the picture(px)
maxColsNumber5Masonry shows the maximum number of columns
linkRangeString‘card’Identify click to trigger jump link range
‘card’ Whole card range
‘img’ image range
‘custom’ Customize the link range through slots
isRouterLinkBooleanfalseRender the a tag when the value is false
Render the router-link component when the value is true
reachBottomDistanceNumber0The distance(px) from the bottom of the container when the scrolling triggers the scrollReachBottom event
loadingDotCountNumber3The number of default loading animation dots
loadingDotStyleObjectnullThe style object of the small dots in the default loading element
loadingTimeOutNumber500Preloading events less than 500ms milliseconds do not display loading animations, increasing the user experience
cardAnimationClassString‘default-card-animation’the animation className for the card


event namedescription
scrollReachBottomWhen the scroll bar scrolls to the bottom, it is used to trigger a request for new image data
preloadedTrigger every time image preloading is completed
clickTrigger when the card is clicked, look at an example under the table

See Demo And Download

Official Website(parys-github): Click Here

This superior jQuery/javascript plugin is developed by parys-github. For extra advanced usage, please go to the official website.

Related Posts


Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…


Simple jQuery Cookie Consent Plugin

jquery.cookie-consent is a simple jQuery plugin to request consent to use cookies. An easy-to-use and highly customizable cookie consent bar that informs your visitors of the use…


Timepicker JavaScript Plugin for jQuery Inspired by Google Calendar

jquery.timepicker is a lightweight jQuery timer plugin inspired by Google Calendar. It supports both mouse and keyboard navigation and weighs 5.5KB minified and compact. Features: Highly customizable…


A Lightweight, Touchable, and Responsive Angular Universal Carousel Library

ngxCarousel is a lightweight, tactile, and responsive library for creating an angular carousel. No dependencies, no more hammer. Must Read: Angular Responsive Image Slider With Lightbox Popup…


First Mobile Full-screen Modal Popup Library For Vue

Vue full-page modal is a responsive, mobile-compatible, screen-friendly pop-up library for Vue.js. Must Read: Modal Component Is Written in Vanilla JS | ensemble Modal How to make…


Generate a Random Number Picker In Vanilla JavaScript

Random Number Picker is a Vanilla JS-based number picker that allows you to generate a random number within a specified range. Must Read: Generating Lottery Numbers Using…

Leave a Reply

Your email address will not be published. Required fields are marked *