How to Create a Masonry Gallery Style through a Collection List?

Hello WeWeb Community! :wave:

I’ve been exploring the dynamic design possibilities within WeWeb and am particularly interested in achieving a masonry grid layout for a collection list. I’m aiming for an aesthetic similar to the Masonry Gallery Block, where elements are organized in an optimal space without strict rows, but rather based on their height and width.


Does anyone know if there is a way to set up a collection list that emulates the masonry gallery style within WeWeb? Any pointers or guidance on how to achieve this effect would be incredibly appreciated.

Thank you in advance for your insights and assistance!

Hi @moscatelli
I was wondering about that the other day!
Here is a demo.

TL;DR: For a single collection list to be displayed in a masonry grid, I’ve use the minimasonry package from the NPM plugin.

3 Likes

For anyone interested, adding a more in-depth video on how to use the NPM method with the MiniMasonry external package :slight_smile:

3 Likes

Hi,
working very well, thanks.
But if i make the grid dynamic it will always unbind the images.

It’s only working if i add the object array directly. Anything i do wrong or is it just not working. ¯_(ツ)_/¯

Hey @IKR :wave:
What do you mean when you say it always unbind the image? Can you make a short video of your issue? :slight_smile: I just tested, and it should be working even with a collection bound to the grid

I got it running, dont know how but it works. :slight_smile:
But thanks letting me know that its possible

1 Like

Hi,
Curious if this is still relevant for today (2024) or there is a “native” way of doing this? Thanks.

Hey there,
Humm not to my knowledge unfortunately.

No worries, thanks @jptrinh, I will use this method for now.