Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/Accordion

Accordion

Stacked sections that expand in place, with subtle dividers and consistent keyboard navigation.

Base UI reference ↗

Plans are billed monthly and you can cancel anytime from settings.

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add accordion

Dependencies

What add accordion installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

npm

Examples

3 examples · 1 component
accordion

Plans are billed monthly and you can cancel anytime from settings.

FAQ

One item open at a time; the first starts open.

accordion

Name, photo and public details.

Email and push preferences.

Several open

multiple keeps each section independent.

accordion

Heading level and disabled

headingLevel={2} for a top-level section; a disabled item is skipped.

API reference

Keeps the props, events and refs of the matching Base UI primitive, plus ZUNO's styles.

PropTypeDefault
value / defaultValue

Open items (by their value).

string[]—
onValueChange

Called with the open items.

(value: string[]) => void—
multiple

Lets several items stay open at once.

booleanfalse
hiddenUntilFound

Closed panels stay searchable: find-in-page opens the matching item.

booleantrue
AccordionItem

value identifies it; disabled blocks it.

div—
AccordionTrigger

headingLevel (2–6) sets the wrapping heading to fit the page outline.

h3 > button—
AccordionContent

Panel with a height animation; className goes to the padded inner box.

div—

States

The states that apply to this component and their visual treatment.

StateTreatment
ClosedOnly the trigger row with a divider.
OpenPanel expanded; the chevron turns 180°.
MultipleSeveral items open at once with multiple.
FocusOffset outline on the trigger.
DisabledDimmed and skipped by the arrow keys.

Accessibility

Each trigger is a button inside a heading, with aria-expanded and aria-controls; Enter and Space toggle it.

Arrow keys move between triggers, Home and End jump to the first and last; disabled items are skipped.

Pick headingLevel so the triggers continue the page's heading outline instead of breaking it.

Closed panels use hidden="until-found", so browser search still finds their text; the height animation stops with reduced motion.