Masonry Feature Cards over Media
A centered header sits above a CSS-columns masonry grid of glass feature cards. Some cards carry an image accent in a video, square, or tall aspect ratio and some carry none, so the grid's card heights vary naturally, all floating over a full-bleed background photo darkened by a semi-transparent overlay.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/masonry-feature-cards-over-media.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature86.tsx instead.
Usage
The file also exports feature86Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Feature86, feature86Demo } from "@/components/blocks/feature/feature86"; export default function Page() { return <Feature86 {...feature86Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small centered label above the heading. |
| heading | ReactNode | none | Centered section heading. |
| description | string | undefined | Centered supporting paragraph. |
| backgroundImage | MediaSlotImage | none | Full-bleed photo behind the whole section, darkened by an overlay. |
| items | MasonryFeatureItem[] | none | Feature cards flowed into the masonry columns in array order. |
| className | string | none | Extra classes for the outer section element. |
Types
interface MasonryFeatureItem { icon: LucideIcon; title: string; description: string; image?: MediaSlotImage; imageAspect?: "video" | "square" | "tall"; }
Behavior notes
- Fully static Server Component: no event handlers, no client state.
- The masonry effect comes from CSS `columns-2`/`columns-3` (responsive) plus `break-inside-avoid` on each card, not from any JavaScript layout calculation; alternating card heights come naturally from which items include an image accent and which aspect ratio that image uses.
- The background photo fills the section via an absolutely positioned MediaSlot plus a bg-background/85 overlay div; cards use a bg-background/80 backdrop-blur-md border border-border/50 glass treatment so they read as floating surfaces over the photo in both light and dark theme.
- Each item accepts its own icon component reference directly, which is safe here since this is a Server Component (not "use client").
More Feature Blocks
View all →Full-Bleed Workspace Band
Two-column header above a full-bleed image band with a live view switcher, closing on three numbered captions.
Center-Line Journey Timeline
Vertical hairline timeline alternating stages either side, dropping a phone frame on one step.
Figure-Led Evidence Rows
Tall image with a floating before-and-after card, leading into oversized-figure evidence rows.
Staircase Asset Trio
Three image tiles stepping down the page in a staircase, each floating a different live asset.
Sticky Reference List
Sticky heading column beside three labelled groups of checked capabilities, closing on a footnote.
Day Timeline Rows
Hairline rows walking through one working day, stamped with time and a live approval card inline.