Accordion

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

Usage

Default

This is the content revealed when expanded.

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

Props

Sortable data table
PropTypeDefaultDescription
titlestring-Accordion summary or heading text.
idstring-HTML id for the accordion (for accessibility).
descriptionstring-Optional description below the title.
childrenReactNode-Content to display inside the expanded accordion.
theme"primary" | "secondary" | "tertiary" | "quaternary" | "clear"Configured DefaultVisual theme of the accordion.
state"" | "success" | "error" | "warning"-Visual state for semantic meaning (success, warning, error).
shadow"none" | "light" | "medium" | "strong" | "intense"Configured DefaultShadow effect for the accordion container.
rounding"none" | "small" | "medium" | "large"Configured DefaultCorner radius of the accordion container.
size"xs" | "small" | "medium" | "large" | "xl"Configured DefaultOverall size of the accordion.
initiallyExpandedbooleanfalseIf true, accordion is expanded by default.
expandedboolean-Manually control expanded state (controlled mode).
outlinebooleanfalseShow outline border style.
disabledbooleanfalseDisable interaction and dim the accordion.
isToggleablebooleantrueIf false, accordion cannot be collapsed.
asyncContentbooleanfalseSimulate async content loading when expanded.
lazyLoadbooleanfalseOnly render children when expanded.
iconPosition"left" | "right""right"Position of expand/collapse icon.
customExpandedIconstring-Custom icon to show when expanded.
customCollapsedIconstring-Custom icon to show when collapsed.
classNamestring-Custom CSS class for styling.
onToggle(expanded: boolean) => void-Callback fired when expanded/collapsed state changes.
data-testidstring"accordion"Test ID for test automation.