Masonry

Class modifiers

ClassDescription
masonry-galleryLets you size items with --item-width, as if you’re using grid-gallery.

CSS Variables

CSS VariableDefaultDescription
--gap-x-Gap between columns
--gap-y-Gap between rows
--gap1rlhGap between columms and rows. --gap-x and --gap-y will override this value.
--cols1Number of columns
--item-width3remSize of each column. Used in gallery-masonry only

Children

CSS Variables

CSS VariableDefaultDescription
--span1Number of columns that the child should occupy.

Masonry Script

PropsDefaultDescription
selectorundefinedThe container for the script. You can pass a selector or element into this value. When undefined, it defaults to document.body.