2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

MasonryGrid

Updated: September 6, 2025
View on GitHub
A component that arranges items in a masonry layout, optimizing space and creating a visually appealing grid. Ideal for displaying images, cards, or any content with varying heights. Control the number of columns in the grid using the columns prop. You can also set different column counts for various screen sizes using responsive props like l, m and s. Adjust the spacing between items using the gap prop.
Prop
Type
Default
children
React.ReactNode
gap
Space between items.
SpacingToken-1undefined
8
columns
How many columns.
number3
style
React.CSSProperties
className
string
l
Column count at the l breakpoint and below.
MasonryBreakpointProps
m
Column count at the m breakpoint and below.
MasonryBreakpointProps
s
Column count at the s breakpoint and below.
MasonryBreakpointProps
xs
Column count at the xs breakpoint.
MasonryBreakpointProps
…and every FlexProps propinherited
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club