vue-next-masonry
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

This is a port of vue-masonry-css for Vue 3


npm version npm bundle size vulnerabilities npm downloads

Usage

import { createApp } from 'vue';
import masonry from 'vue-next-masonry';

createApp(...)
  .use(masonry)
  .mount(...);

In your Vue template...

<masonry :cols="3" :gutter="30">
  <div v-for="(number, index) in 20" :key="index">
    {{ number }}
  </div>
</masonry>

Here's a codesandbox example

Config

Everything is similar to the original component. You can learn more about props/config here.

Slot support

If you are using a <slot /> to load child items, use the prop :resolve-slot="true".

<masonry :resolve-slot="true">
   <slot />
</masonry>

Readme

Keywords

Package Sidebar

Install

npm i vue-next-masonry

Weekly Downloads

490

Version

1.1.3

License

none

Unpacked Size

9.93 kB

Total Files

11

Last publish

Collaborators

  • dapotatoman