Icon Strip + Detail Card over Media
A centered header sits above a horizontal strip of icon pills, one per feature. Clicking a pill sets it active and swaps the single detail card below to that feature's icon, heading, description, and stat, 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/icon-strip-detail-card-over-media.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature85.tsx instead.
Usage
The file also exports feature85Demo, 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 { Feature85, feature85Demo } from "@/components/blocks/feature/feature85"; export default function Page() { return <Feature85 {...feature85Demo} />; }
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 | DetailStripItem[] | none | Features shown in the icon strip, in array order; item 0 is active on mount. |
| className | string | none | Extra classes for the outer section element. |
Types
interface DetailStripItem { title: string; description: string; stat: { value: string; label: string }; }
Behavior notes
- Real client-side state: clicking an icon pill in the strip sets `activeIndex`, which swaps the icon, heading, description, and stat shown in the single detail card below - a direct index toggle, not an accordion, so exactly one detail card is ever rendered at a time.
- The first item (index 0) is active by default on mount.
- Each pill's icon comes from a fixed, hardcoded set indexed by item position rather than a per-item icon prop, since a "use client" component can't accept a component reference from a server parent.
- role="tablist"/role="tab"/role="tabpanel" with aria-selected and aria-controls wire the strip to the detail panel for screen readers.
- Demo props live in a separate feature85.demo.tsx file (no "use client" directive) per this repo's client/demo-props split rule, so the plain demo object is never re-exported through the client module.
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.