Accordion

An interactive heading that can be collapsed and expanded to hide and reveal content.

Stable
Show details
Stable
Published: May 15, 2026
Updated: May 15, 2026

An Accordion is an interactive heading that can be collapsed and expanded to hide and reveal content. It can be used as a single Accordion or as multiple stacked Accordions. It can be used with or without a border.


Anatomy

Anatomy summary lists and describes all the elements within a component (including nested components).

accordion-anatomy

Element

Description

Optional?

1. Top border

Used in the bordered accordion variant to visually separate the accordion from other content.

Yes

2. Chevron - closed

Indicates that an accordion is closed and its content is hidden.

No

3. Title

Heading that concisely describes the content within the accordion.

No

4. Chevron - open

Indicates that an accordion is open and its content is displayed.

No

5. Content

Area to nest content.

No

6. Bottom border

Used in the bordered accordion variant to visually separate the accordion from other content.

If using bordered accordions, the last accordion in a stack (or the individual accordion if using only one) must have a bottom border.

Yes


Variants

Variants contain different versions of the component depending on specific properties, such as state, size, colour, optional iconography, etc.

Accordion
Property Values Default
state Variant rest | hover | focus rest
isOpen Variant false | true false
✏️ title Text string Accordion title
hasBorder Variant false | true false
↳ isLastItem Variant false | true false
Accordion
Accordion
state focus isOpen false hasBorder true ↳ isLastItem true
Focus state on last closed accordion with border, in a stack of multiple accordions.
Accordion
Accordion
state hover isOpen true hasBorder true ↳ isLastItem false
Hover state on open accordion with border.
Accordion
Accordion
state hover isOpen false hasBorder true ↳ isLastItem false
Hover state on a closed accordion with border.
Accordion
Accordion
state hover isOpen true hasBorder false ↳ isLastItem false
Hover state on an open accordion with no border.
Accordion
Accordion
state hover isOpen true hasBorder true ↳ isLastItem true
Hover state on last open accordion with border, in a stack of multiple accordions.
Accordion
Accordion
state focus isOpen true hasBorder true ↳ isLastItem true
Focus state on last open accordion with border, in a stack of multiple accordions.
Accordion
Accordion
state rest isOpen true hasBorder true ↳ isLastItem false
Open accordion with border.
Accordion
Accordion
state focus isOpen true hasBorder true ↳ isLastItem false
Focus state on open accordion with border.
Accordion
Accordion
state rest isOpen true hasBorder true ↳ isLastItem true
Last open accordion with border, in a stack of multiple accordions.
Accordion
Accordion
state rest isOpen false hasBorder false ↳ isLastItem false
Closed accordion with no border.
Accordion
Accordion
state rest isOpen false hasBorder true ↳ isLastItem false
Closed accordion with border.
Accordion
Accordion
state rest isOpen false hasBorder true ↳ isLastItem true
Last closed accordion with border in a stack of multiple accordions.
Accordion
Accordion
state focus isOpen false hasBorder false ↳ isLastItem false
Focus state on a closed accordion with no border.
Accordion
Accordion
state focus isOpen false hasBorder true ↳ isLastItem false
Focus state on a closed accordion with border.
Accordion
Accordion
state focus isOpen true hasBorder false ↳ isLastItem false
Focus state on an open accordion with no border.
Accordion
Accordion
state hover isOpen false hasBorder false ↳ isLastItem false
Hover state on a closed accordion with no border.
Accordion
Accordion
state rest isOpen true hasBorder false ↳ isLastItem false
Open accordion with no border.
Accordion
Accordion
state hover isOpen false hasBorder true ↳ isLastItem true
Hover state on last closed accordion with border, in a stack of multiple accordions.

Component dependencies

This component is internally dependent on the following components:


Help and support