Components/Accordion

Accordion

Collapsible content sections with smooth height animations. Supports single and multiple open modes with full keyboard navigation.

import { Accordion, AccordionItem } from "@animui/ui"

Basic

Multiple open

Set multiple to allow more than one item open at once.

Accordion Props

PropTypeDefaultDescription
multiplebooleanfalseWhen true, multiple items can be open simultaneously.
defaultValuestringThe value of the item that should be open by default.
childrenReact.ReactNodeAccordionItem children.
classNamestringAdditional classes for the wrapper.

AccordionItem Props

PropTypeDefaultDescription
valuestringUnique identifier for this item. Required.
titlestring | React.ReactNodeThe trigger label shown in the header.
childrenReact.ReactNodeContent revealed when the item is open.
classNamestringAdditional classes for this item's wrapper.

Accessibility

  • Each trigger is a <button> with aria-expanded.
  • Content panels have role="region" and are linked to their trigger.
  • Space / Enter toggle the focused item.
© 2026 Steal Shadow. MIT License.Report an issue