Interactive Tech Stack Layers
A platform architecture section that stacks the stack as horizontal, color-coded layers, each numbered and tinted with its own accent. Clicking a layer expands its detail panel; opening one closes whichever was open before, so exactly one layer's details are visible at a time.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/interactive-tech-stack-layers.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature97.tsx instead.
Usage
The file also exports feature97Demo, 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 { Feature97, feature97Demo } from "@/components/blocks/feature/feature97"; export default function Page() { return <Feature97 {...feature97Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small label above the heading; omitted entirely when unset. |
| heading | ReactNode | none | Section heading. |
| description | string | undefined | Supporting copy under the heading. |
| layers | TechStackLayer[] | none | Ordered layers, top of the stack first; the first layer is expanded by default. |
| className | string | undefined | Extra classes for the outer section element. |
Types
type TechStackLayer = { number: string; title: string; summary: string; details: string; tags: string[]; };
Behavior notes
- Real client-side state: clicking a layer's header sets it as the open layer via useState<number | null>; clicking the already-open layer closes it, and opening a different layer closes whichever was previously open, so at most one layer's detail panel is expanded at a time.
- "use client" component, so its demo props live in the sibling feature97.demo.tsx file per this repo's client/demo-file-split rule, not in feature97.tsx itself.
- Layer color is derived purely from the layer's array position against a fixed 5-color palette of semantic chart-N tokens (bg-chart-1 through bg-chart-5), cycling if there are more than 5 layers, so colors stay theme-consistent in light and dark rather than using literal color classes.
- The first layer is expanded by default on mount.
- aria-expanded and aria-controls wire each layer header to its panel for screen readers.
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.