Staaarter

Hero Card + Grid Cards over Media

A centered header sits above one large hero card (image on top, heading/description/button below) and a three-column feature card grid underneath, all floating over a full-bleed background photo darkened by a semi-transparent overlay for text contrast.

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 badge, button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/hero-card-grid-cards-media.json

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

Usage

The file also exports feature70Demo, 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 { Feature70, feature70Demo } from "@/components/blocks/feature/feature70";

export default function Page() {
  return <Feature70 {...feature70Demo} />;
}

Props

PropTypeDefaultDescription
badgestringundefinedSmall centered label above the heading.
headingReactNodenoneCentered section heading.
descriptionstringundefinedCentered supporting paragraph.
heroImageMediaSlotImagenoneImage across the top of the hero card.
heroHeadingstringnoneHeading inside the hero card, under its image.
heroDescriptionstringundefinedSupporting paragraph inside the hero card.
heroCtaFeature70CtaundefinedOptional link button inside the hero card.
cardsFeature70Card[]noneFeature cards rendered in a three-column grid below the hero card.
backgroundImageMediaSlotImagenoneFull-bleed photo behind the whole section, darkened by an overlay.
classNamestringnoneExtra classes for the outer section element.

Types

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

interface Feature70Cta {
  label: string;
  href: 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, using semantic tokens so the overlay (and the hero/feature cards' bg-card/95 backdrop-blur surfaces on top of it) automatically adapt between light and dark theme rather than hardcoding a black scrim.
  • The hero card's button renders as a real Next.js Link via the button's render prop, but has no destination behavior beyond navigating to whatever href you supply.
  • The three grid cards accept their own icon component reference directly, which is safe here since this is a Server Component (not "use client").