Skip to content
Protocore Design Systemv1.6.9

/// Navigation

StickyAccordion

Sticky-rail accordion — a pinned left rail (eyebrow, headline, illustration) beside a scrolling column of numbered rows that open one at a time.

import { StickyAccordion } from "@protocore/pds";
View as Markdown

Basics

Give the rail an eyebrow, title, and art, then pass the expandable items. The rail stays pinned while the numbered rows scroll; clicking a row reveals its body, one open at a time. It needs a tall container to show the sticky effect.

Asset Issuance

Connect to 150+ supported blockchains.

Controlled

Own the open row with open + onOpenChange to sync it with scroll position, analytics, or a deep link; otherwise use defaultOpen.

open: [ 01 ]
Protocol

The three roles that move a message.

When to use it

StickyAccordion is a landing-page deep-dive for *one idea, several facets* — a product whose capabilities you want to narrate while a headline and illustration stay anchored beside them.

  • A plain FAQ or settings stack with no rail? Use the lighter Accordion.
  • Presenting several distinct pillars side-by-side? Use TabbedShowcase.
  • An ordered process with progress? Use Steps.
  • Feed the art slot a LineArt field and keep row bodies to a sentence.

Usage

Do

  • Give it a tall container so the sticky rail has room to pin.
  • Keep all rows about one theme — the rail states the single idea.
  • Use a LineArt illustration anchored in the art slot.
  • Keep row bodies short; this is a narrative surface, not a document.

Don't

  • Don't use it for unrelated FAQ entries — that's a plain Accordion.
  • Don't put more than ~6 rows in the scrolling column.
  • Don't nest interactive forms inside a row body.
  • Don't rely on it on very short pages where nothing scrolls past the rail.

Accessibility

KeysAction
TabMove focus across the numbered row buttons
Enter / SpaceOpen the focused row (closing the previously open one)
  • Each row is a real `<button>` with `aria-expanded` reflecting whether its body is shown.
  • The `[ 0N ]` row index is `aria-hidden` decoration; the row title is the button's accessible name.
  • The rail is presentational — the interactive control is the row list.

StickyAccordion props

PropTypeDefaultDescription
artReactNodeIllustration anchored to the bottom of the sticky rail (e.g. a `<LineArt>`).
classNamestring
defaultOpennumber0Uncontrolled initial open index. Default 0.
eyebrowReactNodeMono eyebrow at the top of the sticky rail.
items *AccordionItem[]The expandable numbered rows.
onOpenChange((index: number) => void)Fires with the next open index whenever a row is toggled.
opennumberControlled open index. Pair with `onOpenChange`.
railReactNodeFully custom rail content (overrides eyebrow/title/art).
styleCSSProperties
titleReactNodeDisplay headline in the sticky rail.

Related

  • AccordionDisclosure list — hairline-separated rows with a sans title and a mono +/− glyph that swaps as a row opens. Single or multiple.
  • TabbedShowcaseTab-bar-over-panel showcase — mono [ 0N ] tabs that fill and merge into a bordered panel below. Split lays copy beside an illustration; single is one column.
  • StepsStepper — an ordered list of [ 0N ]-marked steps joined by hairline connectors, with done / active / pending states. Vertical or horizontal.
  • PageHeaderPage title row — an optional icon tile and eyebrow, an h1, a lead line, a meta-badges slot and an actions slot, closed by a bottom hairline.