Skip to content
Display

Masonry

Server Component

A responsive CSS multi-column masonry layout for cards and images.

Import

tsx
import { Masonry } from "@cronus-ui/ui";
bash
npx cronus-ui add masonry

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component MasonryDefault layout:inline style:masonry {
  aria-label:"Gallery"
  label "Gallery"
  text "Alpha"
  text "Beta"
  text "Gamma"
  text "Delta"
}

page "/audit/masonry/default" type:custom {
  use MasonryDefault
}

API Reference

Generated from the component's exported types.

MasonryProps

Extends HTMLAttributes<HTMLDivElement>

Skip MasonryProps props table
PropTypeDefaultDescription
columns
number | MasonryColumnsDEFAULT_COLUMNSNumber of columns, either a fixed count or a responsive map keyed by breakpoint.
gap
string"1rem"CSS length used for both the column gap and the vertical gap between items.
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.