masonix
Guide

Responsive Layouts

Build masonry layouts with breakpoint maps or automatic column widths.

Responsive Masonix layouts are based on the component container, not just the window. That makes the same grid work in full pages, side panels, cards, and resizable app surfaces.

ReleaseReady

Launch plan

Milestones, owners, and final QA notes for the public release.

DesignReview

Brand board

Palette, type scale, and image direction for campaign pages.

ResearchNew

Research notes

Five customer interviews summarized into product opportunities.

GrowthDone

Metrics review

Activation moved up after the onboarding card refresh.

ProductPlanning

Roadmap

Small bets that improve feed performance and editorial control.

SupportOpen

Support themes

Repeated tickets grouped by install, styling, and virtualization.

Exact column counts

Use columns when design specifies exact counts.

<Masonry
  items={items}
  columns={{ 0: 1, 640: 2, 1024: 3, 1280: 4 }}
  gap={{ 0: 10, 640: 14, 1024: 18 }}
  render={({ data }) => <Card item={data} />}
/>

Breakpoint keys are minimum container widths in pixels. The largest matching key wins.

Automatic columns

Use columnWidth when the card has a minimum comfortable width and the layout can decide how many columns fit.

<Masonry
  items={items}
  columnWidth={260}
  maxColumns={5}
  gap={16}
  render={({ data }) => <Card item={data} />}
/>

maxColumns prevents very wide containers from creating too many narrow vertical lanes.

Choosing gaps

gap can be a number or a breakpoint map. For MasonryBalanced and MasonryVirtual, keep gap values numeric because placement math needs pixel values.

Practical notes

  • Use defaultColumns for a stable server-rendered first pass.
  • Use defaultWidth when known-height math depends on the container width.
  • Prefer container-aware settings over viewport-only assumptions in dashboards and docs layouts.

On this page