Rebar UI

1.0

opinion

Accordion

Stacked sections, one open at a time.

Project briefSingle open, keyboard arrows

Wayfinding for the three northern depots. Delivery 21 Nov.

Collapsed

Several open

Brand

4 people

Disabled

Long text

Permit lead time is ten working days.

In context

Research log and FAQGrouped notes, and short answers
Crew interviews

Ferry crew, three sessions recorded. Notes tagged and shared with Maya.

FAQ

Owners and editors. Viewers can comment.

Accordion props

PropTypeRequiredDefault
type"single" | "multiple"Yes—
asChildboolean | undefinedNo—

AccordionItem props

PropTypeRequiredDefault
valuestringYes—
idstring | undefinedNo—
triggerReactNodeYes—
disabledboolean | undefinedNo—

Accessibility

Radix accordion: each trigger is a <button> inside a heading with aria-expanded and aria-controls; each panel is a region labelled by its trigger. Arrow keys move between triggers, Home and End jump to the ends, Enter or Space toggles. A disabled item is skipped.

data-rebar-* attributes

data-rebar-component="accordion" on the root; data-rebar-part="item" | "trigger" | "content". Radix's own data-state="open"|"closed" is read directly.

Migrating to Ant Design

AntD's Collapse takes an items array rather than JSX children: a real, if mechanical, restructuring, not a straight prop rename.