Switchable Capability Ledger
A capability section with a row of pill filters up top. Clicking a filter swaps the ruled list below it to only that group's entries, each rendered as a three-column row: a title, a short explanation, and the typical duration pinned to the right.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/switchable-capability-ledger.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature23.tsx instead.
Usage
The file also exports feature23Demo, 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 { Feature23, feature23Demo } from "@/components/blocks/feature/feature23"; export default function Page() { return <Feature23 {...feature23Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small label above the heading. |
| heading | ReactNode | none | Section heading. |
| description | string | undefined | Supporting paragraph under the heading. |
| filters | Feature23Filter[] | none | Pill filter options; the first entry is active by default. |
| entries | Feature23Entry[] | none | Ledger rows, each tagged with the filter id it belongs to. |
| className | string | none | Extra classes for the outer section element. |
Types
interface Feature23Filter { id: string; label: string; } interface Feature23Entry { filterId: string; // matches a Feature23Filter.id title: string; description: string; duration: string; }
Behavior notes
- Real interactivity: clicking a pill filter updates local state and the ledger list below re-filters to only the entries whose filterId matches, using the Button component's aria-pressed state to mark the active pill.
- The first filter in the array is active by default; there is no URL or prop-driven initial filter.
- If a filter has no matching entries, the ledger shows a plain empty-state message instead of an empty list.
- Rows stack the title above the explanation on narrow screens and lay out as three columns from the sm breakpoint up.
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.