vue-masonry-wall
A pure vue masonry project without direct dom manipulation and ssr friendly. I created this because vue-masonry has no SSR support and I needed a pure vue implementation.
Installation
NPM
Yarn
Features
- No Direct DOM Manipulation
- SSR Support
Usage
Basic
Nuxt SSR
Add :ssr="{columns: 2}"
to masonry so that during SSR, it will be load in 2 columns.
SSR has no clue what is the size of your height of your element or width of the browser.
You can however guess based on user-agent: https://github.com/nuxt-community/device-module
This param allow you to preload a config for SSR rendering, it will distribute your items into all columns evenly.