New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-masonry

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-masonry

masonry layout for vue.js

  • 0.10.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-67.74%
Maintainers
1
Weekly downloads
 
Created
Source

vue-masonry

Vue.js directive for masonry blocks layouting. Original masonry library.

Plugin DEMO available 🎉

You can also clone the basic demo repository vue-masonry + vue-cli webpack.

DEPENDENCIES status

Install & Usage

  • Get from npm: npm install vue-masonry --save

    or from bower bower install vue-masonry

  • Make sure that the masonry library is included; for example using cdn link: <script async defer src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.0.0/masonry.pkgd.min.js"></script> or in other convenient way.

  • Use in component code

    import Vue from 'vue'
    import VueMasonryPlugin from 'vue-masonry';
    
    Vue.use(VueMasonryPlugin)
    
    <div v-masonry transition-duration="0.3s" item-selector=".item">
        <div v-masonry-tile class="item" v-for="(item, index) in blocks">
           <!-- block item markup -->
        </div>
    </div>
    

Properties currently available reproduce most of those on the original masonry plugin:

  • item-selector=".item" - list element DOM item selector;
  • transition-duration="0.3s - duration of transitions;
  • column-width="#test" - element selector for column width;
  • origin-left="false" - set to group elements to the right instead of left by default
  • origin-top="false" - set to group elements to the bottom instead of top by default
  • stamp=".stamp" - specifies which elements are stamped within the layout
  • gutter=".gutter-block-selector" - specifies [horizontal space between item elements] (https://masonry.desandro.com/options.html#gutter). Set gutter to an Element or Selector String to use the outer width of the element.
  • fit-width="true" - sets the width of the container to fit the available number of columns

💡 New 💡 : If you need to manually trgiger masonry layout redraw (for example in case if your tile elements amount or content has changed) you can now use Vue.redrawVueMasonry() method.

Questions, bugs

License

MIT

Keywords

FAQs

Package last updated on 05 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc