Click-to-Swap Sticky Thread List
Two-column feature section: an optional eyebrow and heading sit above a vertical list of clickable thread buttons on the left. Clicking a thread swaps the sticky image panel on the right; the active thread carries full-emphasis text, a left accent border, and its description expanded beneath it.
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/click-to-swap-thread-list.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature35.tsx instead.
Usage
The file also exports feature35Demo, 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 { Feature35, feature35Demo } from "@/components/blocks/feature/feature35"; export default function Page() { return <Feature35 {...feature35Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Kicker label above the heading; omitted entirely when unset. |
| heading | ReactNode | undefined | Section heading; omitted entirely when unset. |
| threads | ThreadItem[] | none | Clickable thread entries; the first is active by default. |
| className | string | none | Extra classes for the outer section element. |
Types
type ThreadItem = { title: string; description: string; photo: { src: string; alt: string }; };
Behavior notes
- Real interactivity: clicking a thread button sets it as active via useState, swapping the sticky image panel's photo and expanding that thread's description; this is genuine local state, not decorative.
- "use client" component, so its demo props live in the sibling feature35.demo.tsx file per this repo's client/demo-file-split rule, not in feature35.tsx itself.
- The image panel uses `lg:sticky lg:top-24` so it stays in view alongside the thread list while scrolling on larger screens; it is not sticky on mobile where the layout stacks.
- The active thread's left border and full-emphasis text are the only visual cue for selection; inactive threads show muted text and no border until hovered.
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.