Staaarter

Two-Column Alternating Cards over Media

A centered header sits above a stack of two-column rows: one glass card with a large icon and index number, paired with a second card holding a heading, description, and a short checklist. Rows alternate which side the icon card sits on, over a full-bleed background photo darkened by a semi-transparent overlay.

By Staaarter Team
Feature
Docs
Live preview

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/two-column-alternating-cards-over-media.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature84.tsx instead.

Usage

The file also exports feature84Demo, 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 { Feature84, feature84Demo } from "@/components/blocks/feature/feature84";

export default function Page() {
  return <Feature84 {...feature84Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall centered label above the heading.
headingReactNodenoneCentered section heading.
descriptionstringundefinedCentered supporting paragraph.
backgroundImageMediaSlotImagenoneFull-bleed photo behind the whole section, darkened by an overlay.
itemsZigzagFeatureItem[]noneAlternating rows, each rendered as an icon card plus a description card.
classNamestringnoneExtra classes for the outer section element.

Types

interface ZigzagFeatureItem {
  icon: LucideIcon;
  title: string;
  description: string;
  points: string[];
}

Behavior notes

  • Fully static Server Component: no event handlers, no client state.
  • The background photo fills the section via an absolutely positioned MediaSlot plus a bg-background/85 overlay div; each row's two cards use a lighter 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.
  • Rows alternate which side the icon card renders on using a CSS order utility on odd rows, purely presentational and requiring no JavaScript.
  • Each item accepts its own icon component reference directly, which is safe here since this is a Server Component (not "use client").