vue-masonry
Advanced tools
Comparing version 0.12.0 to 0.13.0
{ | ||
"name": "vue-masonry", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "masonry layout for vue.js", | ||
@@ -5,0 +5,0 @@ "main": "src/masonry.plugin.js", |
@@ -6,7 +6,7 @@ # vue-masonry | ||
**Current version: 0.11.8** | ||
**Current version: 0.13.0** | ||
Vue.js directive for masonry blocks layouting. Original [masonry library](http://masonry.desandro.com/). | ||
Plugin [DEMO](https://shershen08.github.io/vue-plugins-demo-static/index.html#/masonry) available 🎉, [JSFiddle DEMO](https://jsfiddle.net/jericopulvera/wq07brjs) | ||
Plugin [DEMO](https://shershen08.github.io/vue-plugins-demo-static/index.html#/masonry) available 🎉, [JSFiddle DEMO](https://jsfiddle.net/shershen08/n54039qg/) | ||
@@ -49,2 +49,28 @@ The plugin can be easily integrated with different CSS Frameworks. Check this [Tailwind CSS DEMO](https://jsbin.com/zafegay/edit?html,output). | ||
### Usage with Vue 3 | ||
Check you're using v.0.13.0 and above | ||
- Dependencies: [mitt](https://www.npmjs.com/package/mitt) package | ||
- In your Vue 3 app, you'll have the following code | ||
``` | ||
import { createApp } from 'vue' | ||
import mitt from 'mitt' | ||
import { VueMasonryPlugin } from "vue-masonry/src/masonry-vue3.plugin"; | ||
const emitter = mitt() | ||
let app = createApp(App) | ||
app.config.globalProperties.emitter = emitter | ||
app.use(VueMasonryPlugin) | ||
app.mount('#app') | ||
<div v-masonry="containerId" transition-duration="0.3s" item-selector=".item"> | ||
<div v-masonry-tile class="item" v-for="(item, index) in blocks"> | ||
<!-- block item markup --> | ||
</div> | ||
</div> | ||
``` | ||
### Usage directly in the browser | ||
@@ -51,0 +77,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
79321
12
335
178
0