Skip to content
  • Android
  • iOS
  • Web

Accordion

An Accordion component is a UI element that allows users to expand and collapse sections of content. It is commonly used to organize information in a compact and accessible manner, displaying only the headers by default and revealing the associated content when clicked. This helps improve the readability of complex or lengthy information by reducing clutter on the page.

Live examples

Example.tsx
Single
Multiple

Attributes

NAccordion attributes
NameTypeDefaultDetails
itemsreadonly T[]RequiredPanels with a title, message, and optional id and disabled flag.
type"single" | "multiple"OptionalHow many panels can be open at once. Default: single.
defaultExpandedbooleanOptionalOpen the first enabled panel initially when expansion is uncontrolled.
expandedbooleanOptionalControl whether any panel is open. Opening selects the first enabled panel if no selection is saved.
onExpandedChange((expanded: boolean) => void)OptionalCalled when a user action opens the first panel or closes the last one.
variant"default" | "surface"OptionalSurface gives each panel its own background and border. Default: default.
classNamestringOptional
itemClassNamestringOptional
triggerClassNamestringOptional
contentClassNamestringOptional
indicatorClassNamestringOptional
Engine reference for AccordionSet up engine components

Tags