Replace the div with your component and add span classes in the order that is shown below to get the masonry layout

With masonry-grid--alternating-asymmetric: no span classes needed, pattern alternates 5+3 / 3+5

With masonry-grid--mixed: no span classes needed, pattern alternates 4+4 / 5+3 / 4+4 / 3+5