vue-next-masonry is a UI component library offering a responsive masonry layout for Vue 3 applications. It functions as a direct port of the well-established `vue-masonry-css` library, specifically adapted for the Vue 3 composition API and ecosystem. The current stable version is 1.1.3, indicating ongoing maintenance and compatibility with recent Vue 3 releases. Its release cadence appears to be driven by bug fixes, minor enhancements, and alignment with Vue 3's evolution rather than a strict schedule. A key differentiator is its seamless integration into Vue 3 projects for developers familiar with the Vue 2 `vue-masonry-css` component, providing a familiar API while leveraging Vue 3's performance improvements. It aims to provide an easy-to-use `<masonry>` component that automatically arranges child elements into a grid with variable column heights, optimizing space and improving visual presentation for galleries, portfolios, and lists.
npm install vue-next-masonryVerified import paths — ran on the pinned version, not inferred.
Demonstrates global registration of the masonry component and its basic usage in a Vue 3 template with dynamic item heights.
Ensure your project uses Vue 3 (minimum `vue` peer dependency is `^3.0.5`).
Add `:resolve-slot="true"` to your `<masonry>` component when child content is provided via a slot.
Refer to the `vue-masonry-css` GitHub repository (https://github.com/paulcollett/vue-masonry-css) for comprehensive prop documentation.
Ensure you call `app.use(masonry)` in your main application entry point (`main.ts` or `main.js`) after creating your Vue app instance.
Add the prop `:resolve-slot="true"` to your `<masonry>` component if its children are being rendered via a `<slot />`.
Verify that you are importing `createApp` from 'vue' and using it to initialize your application, and that your project dependencies correctly specify Vue 3.