Staaarter

Asymmetric Tall + Compact Cards over Media

Alternating asymmetric rows, each pairing one tall highlight card (icon, title, description, optional stat) with a stack of smaller compact cards, laid over a full-bleed background photo darkened by a semi-transparent overlay for text contrast. Row order flips left/right on every other row.

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/asymmetric-tall-compact-cards-media.json

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

Usage

The file also exports feature69Demo, 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 { Feature69, feature69Demo } from "@/components/blocks/feature/feature69";

export default function Page() {
  return <Feature69 {...feature69Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall centered label above the heading.
headingstringnoneCentered section heading.
descriptionstringundefinedCentered supporting paragraph.
backgroundImageMediaSlotImagenoneFull-bleed photo behind the whole section, darkened by an overlay.
rowsFeature69Row[]noneAlternating highlight-card + compact-cards rows; every other row flips left/right.
classNamestringnoneExtra classes for the outer section element.

Types

interface Feature69HighlightCard {
  icon: LucideIcon;
  title: string;
  description: string;
  stat?: { value: string; label: string };
}

interface Feature69CompactCard {
  icon: LucideIcon;
  title: string;
  description: string;
}

interface Feature69Row {
  highlight: Feature69HighlightCard;
  compactCards: Feature69CompactCard[];
}

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, using semantic tokens so the overlay (and all card/text colors on top of it) automatically adapt between light and dark theme rather than hardcoding a black scrim.
  • Every other row swaps the highlight card and compact-card stack via a CSS order utility on the first grid child, alternating which side carries the tall card.
  • Cards accept their own icon component reference directly, which is safe here since this is a Server Component (not "use client").