Feature Spotlight Tabs
A feature section where a row of pill-shaped tab chips switches a large spotlight panel below, showing that tab's image, title, description, and a short checklist. An optional auto-loop advances through the tabs on a timer until a visitor clicks one, at which point the loop stops.
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/feature-spotlight-tabs.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature38.tsx instead.
Usage
The file also exports feature38Demo, 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 { Feature38, feature38Demo } from "@/components/blocks/feature/feature38"; export default function Page() { return <Feature38 {...feature38Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small label above the heading; omitted entirely when unset. |
| heading | ReactNode | none | Section heading. |
| tabs | SpotlightTab[] | none | Tab entries; the first is active by default. |
| autoLoopMs | number | undefined | Milliseconds between automatic tab advances; omit to disable the auto-loop. |
| className | string | undefined | Extra classes for the outer section element. |
Types
type SpotlightTab = { label: string; title: string; description: string; checklist: string[]; image?: { src: string; alt: string }; };
Behavior notes
- Real client-side state: clicking a tab chip sets it as the active tab via useState, swapping the spotlight panel's image, title, description, and checklist.
- Real auto-loop: when autoLoopMs is set, a setInterval started from that fixed literal advances the active tab every autoLoopMs milliseconds; clicking any chip pauses the loop for the rest of the block's lifetime.
- "use client" component, so its demo props live in the sibling feature38.demo.tsx file per this repo's client/demo-file-split rule, not in feature38.tsx itself.
- The checklist's check icon is purely decorative; there is no real completion state behind it.
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.