• Docs
  • Components
  • Masonry

Masonry - Aspect UI

The Masonry component arranges items in a responsive grid layout that optimizes vertical space, similar to Pinterest. It adapts to varying item heights for visually appealing layouts.

Table of Contents#

Masonry Props#


PropTypeDefaultDescription
childrenReactNode[]-Array of elements to be displayed in the masonry grid layout.
columnCount{ sm: number; md: number; lg: number; xl: number }{ sm: 1, md: 2, lg: 3, xl: 4 }Number of columns to display at different screen sizes.
gapnumber4Gap between items in the masonry grid (in pixels or spacing units).
classNamestring''Additional CSS classes for the masonry container.
...restHTMLAttributes<HTMLDivElement>-Any other HTML div attributes passed to the masonry container.