Skip to content
synccn

Masonry

New

Pinterest-style layout for items of different heights, in pure CSS so it works on the server.

Moodboard

Calm, dark, a single accent.

Release notes

Saved views, live cursors and a faster table.

Idea

Keyboard-first onboarding.

Bug

Tooltip clipped inside scroll areas on Safari.

Copy

Own your components.

Research

Six interviews: everyone wants saved filters, nobody wants another settings page.

Todo

Ship the changelog.

Metric

Activation up 12% after the new checklist.

Installation

$ pnpm dlx shadcn@latest add @synccn/masonry

First time in this project? Connect synccn with one command.

Usage

import { Masonry } from "@/components/ui/masonry";<Masonry columnWidth={220}>{cards}</Masonry>

API reference

Generated from the component's TypeScript types, so it always matches the code.

Masonry

Pinterest-style layout for items of different heights, in pure CSS (so it works on the server and needs no measuring). Items flow down each column, then across.

  • children
    React.ReactNode

    Items of any height.

  • columnWidth
    number

    Default 220

    Narrowest a column may get, in pixels. The number of columns follows from the width.

  • gap
    number

    Default 12

    Space between items, in pixels.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

No ARIA roles, key handling or motion settings in its source. It renders plain elements, so its accessibility comes from the content and labels you give it.