A masonry layout places cards of different heights into close columns, filling gaps as it goes. It is like stacking books of different sizes on shelves, fitting them together instead of lining every top edge up.
An image gallery can use this layout when pictures have different shapes. Visitors can see more of the collection without large empty spaces between rows.
Keep the reading order clear, especially for keyboard users. A tidy visual arrangement is not helpful if someone cannot tell which card comes next or find items in a predictable order.
