An accordion enables users to expand and collapse sections of content.

Example: Multi-section

⌘ Cmd + ⌥ Option + 1

Properties

"AccordionSection" Component
propertypropTyperequireddefaultdescription
_isSelectedbool--
_onClickHandlerfunc--
childrennodeyes-
testSectionstring--
titlestringyes-
"Accordion" Component
propertypropTyperequireddefaultdescription
initiallySelectednumber-0
childrennode | [node]yes-
testSectionstring--

Usage

Accordions are best used when users need to consume specific areas of content within a page or when vertical space is limited. Use Accordions when there is enough content to condense. Avoid nested Accordions because it increases the cognitive load for users. Users may have multiple Accordions open at the same time. The entire header area is clickable to expand or collapse the content below.

Best practices

Do

When you need to provide sectioned content

Don't

Use when there's very little content in each section