Filters within listing

Hi,

I’m working on a item listing that has filters within the listing.

Example:

The orange boxes can change of height. I first tried this with Masonry this worked but I was a bit too buggy. Next to that the Ember Masonry library is deprecated. So I didn’t like this solution.

Does anyone have any ideas on how I can implement this?

Thanks! Stefan Fransen