About
A masonry layout that packs cards of uneven height into columns while keeping source (and keyboard/screen-reader) order, for galleries, notes, and testimonials.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Masonry Grid to your project and fits it to your theme.
Code
How Masonry Grid is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { MasonryGrid } from "@/components/ui/masonry-grid";
const NOTES = [
{
author: "Maya Chen",
text: "Northwind wants net 45 on the next renewal. Fine if the volume commit stays.",
},
{
author: "Theo Okafor",
text: "Bank sync matched 212 of 219 transfers this week. The 7 misses were missing references.",
},
{
author: "Priya Raman",
text: "Pricing page copy is drafted. Needs a pass on the enterprise tier wording, the current version promises SSO on every plan which is not true, and a decision on whether we show annual prices first.",
},
{ author: "Sam Lowe", text: "Deploy window moved to 17:00 Thursdays." },
{
author: "Maya Chen",
text: "Helix Biotech asked for a PO field on invoices. Two other customers asked for the same thing in September, so it should move up the list.",
},
{ author: "Theo Okafor", text: "INV-2033 reminder sent." },
];
export default function MasonryGridDemo() {
return (
<MasonryGrid
aria-label="Team notes"
minColumnWidth={200}
gap={16}
className="max-w-2xl"
>
{NOTES.map((n, i) => (
<div
key={i}
className="rounded-xl border border-border bg-surface p-4 shadow-raised"
>
<p className="text-sm leading-[1.55] text-fg">{n.text}</p>
<p className="mt-3 text-xs text-fg-muted">{n.author}</p>
</div>
))}
</MasonryGrid>
);
}















