Back to Accordion
Accordion

Keyboard behavior

Multiple-open accordion for exploring keyboard navigation.

Focus a trigger, then use Arrow Up/Down to move, Home/End to jump, and Enter or Space to toggle.

First panel content.

API

PropTypeDefaultDescription
items*AccordionItem[]Sections to render.
allowMultiplebooleanfalseWhen true, multiple sections can be open at once.
activeKeysstring[]Controlled open section keys.
onActiveKeysChange(keys: string[]) => voidFires when open section keys change.
defaultOpenKeysstring[]Initial open keys (uncontrolled).
forcedOpenKeysstring[]Keys that stay open and cannot be closed.
disabled (item)booleanDisables a single item.
View full API on Accordion

More Accordion examples