Accordion

The Accordion component allows you to show and hide content sections with expand and collapse interactions.

Usage & Examples

Default

This is the content revealed when expanded.

default.tsx
<Accordion title="Default Accordion">
  <p>This is the content revealed when expanded.</p>
</Accordion>

Props API

32 props
Columns
Accordion props API
Default
Description
aria-describedbystringNoariaID reference for describing the accordion toggle button. This can supplement or replace the generated description ID.
aria-labelstringNoariaAccessible label for the accordion toggle button. Useful when the visible title is not descriptive enough.
aria-labelledbystringNoariaID reference for labeling the accordion toggle button. Prefer this when an external visible label already exists.
asyncContentbooleanNopropsfalseIf true, the accordion content is loaded asynchronously.
childrenReactNodeNopropsThe content to display when the accordion is expanded.
classNamestringNostylingAdditional custom class names for the wrapper element.
customCollapsedIconReactNodeNopropsCustom icon to display when the accordion is collapsed.
customExpandedIconReactNodeNopropsCustom icon to display when the accordion is expanded.
data-testidstringNotestingBackward-compatible alias for test ID attributes.
descriptionstringNopropsAccessible description. This can be announced to assistive technologies via aria-describedby.
disabledbooleanNopropsfalseIf true, disables user interaction and styles the accordion as disabled.
expandedbooleanNopropsIf set, enables controlled mode. Determines whether the accordion is expanded.