Accordion
A vertically stacked set of interactive headings that each reveal an associated panel of content, built on the Base UI Accordion primitive.
A vertically stacked set of interactive headings that each reveal an associated panel of content, built on the UI SDK Accordion component.
Installation
Usage
Examples
Multiple open panels
In a card
Split items
API reference
The UI SDK flavour is built on UI SDK Accordion. Its API is the SevenUI wrapper's, the same in both flavours: export names, props, data-slot values and the render prop, so code that uses only the SevenUI exports compiles against either flavour. What behaves differently, and any prop that is ignored or not supported, is listed below; code that imports a Base UI or third-party library directly needs changes. Switch to Base UI to read the prop tables, which describe that shared API in Base UI's terms.
Differences on UI SDK
orientationandloopFocuson the root are accepted and ignored.
Accordion
Extends the
Base UI Accordion
Root — all its props apply. value/defaultValue are arrays of the
open item values (defaultValue={["item-1"]}), not a single value.
| Prop | Type | Default |
|---|---|---|
value / defaultValue | string[] | — |
onValueChange | (value: string[]) => void | — |
multiple | boolean (renamed from openMultiple in 1.7) | false |
hiddenUntilFound | boolean — hidden="until-found" panels reveal via find-in-page | false |
disabled | boolean | false |
AccordionItem
Takes the item value (and disabled).
AccordionTrigger
A native <button> inside an <h3> heading (Accordion.Header) —
override the heading level via render on the primitive’s Header when
composing directly. The open state styles via data-panel-open
(presence) — not data-open, which lives on Item/Panel/Root. A disabled
trigger stays focusable with aria-disabled="true" — style it with
data-disabled:, not disabled:.
AccordionContent
Open/close animates via the animate-accordion-down /
animate-accordion-up utilities. Their keyframes ship in this
primitive’s registry item (the CLI merges them into your CSS); when
copying the source manually, add them yourself:
--accordion-panel-height is set by Base UI on the panel.