Expertise Accordion
A horizontal accordion of services: collapsed items show as narrow columns with a vertical label, and clicking one expands it to reveal an image, a description, and a row of tag pills, while the others narrow back down.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot, badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/expertise-accordion.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature61.tsx instead.
Usage
The file also exports feature61Demo, 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 { Feature61, feature61Demo } from "@/components/blocks/feature/feature61"; export default function Page() { return <Feature61 {...feature61Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | none | Small label above the heading. |
| heading | ReactNode | none | Section heading. |
| description | string | none | Supporting copy under the heading. |
| items | ExpertiseItem[] | none | Accordion items, rendered in array order. |
| className | string | none | Extra classes for the outer section element. |
Types
type ExpertiseItem = { title: string; description: string; tags: string[]; image: MediaSlotImage; };
Behavior notes
- Real client-side state: clicking a column's header expands it (`flex-grow` animated via a CSS transition) and reveals its image, description, and tag pills; opening one column narrows whichever was previously open, so only one is expanded at a time.
- The first item (index 0) is expanded by default on mount.
- A collapsed column's title renders with `writing-mode: vertical-rl` (rotated 180 degrees) so it reads bottom-to-top as a vertical label; the open column's title switches to a normal horizontal heading.
- Each item's leading 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.
- aria-expanded and aria-controls wire each header button 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.