Accordion

24.1

Accordions allow users to expand and collapse content to keep interfaces clean.

Accordion

24.1

Accordions allow users to expand and collapse content to keep interfaces clean.

Accordion

24.1

Accordions allow users to expand and collapse content to keep interfaces clean.

Overview

The accordion component is used to show and hide a section of content.

A block with a section title and an carret pointing down.

Usage

  1. The component can be used to show and hide optional, advanced, or less important sections. 

  2. The component can be used to show and hide sections when there’s too many of them.

Anatomy

User interface mockup showing a form layout structure.
  1. Title + chevron: click area for expanding and collapsing the accordion.

  2. Extra header content: additional information and controls for the accordion section that are always visible even when the accordion is collapsed.

Variants, Props, & Customization

Title

Title text style can be customized. Use a text style that is appropriate and on the same level of other section titles in the same page.

Four square with different font sizes

Chevron

Chevron can be placed in 3 different positions, depending on the use case:

  • Right, Left, and Far Right.

    Change the variant as per requirement. Stay consistent with one chevron position within a flow, and avoid using different chevron positions within the same flow.

Three blocks showing carret positioning, right, left and far rigth in order

Chevron’s style can be customized.

  • We always recommend the blue circle chevron, only use other styles if there’s a strong reason.

  • Chevron's position cannot be customized at the moment other than the ones defined as a variant.

Examples of accordions with default styling and custom styling


Padded

Padded accordions are used if accordion sections need more weight and separation from each other.

Example of padding in a container where accordion component can be nested
  • Use color-background-base for the background when the accordion is placed on color-background-body

  • Use color-background-body for the background when the accordion is placed on color-background-base

  • Use color-background-base + color-border-separator for the background when the accordion is placed on color-background-base-alt


Example of accordion component in different backgrounds


Extra Header Content

There are no specific guidelines on what to put there, but make sure that the content is similar or smaller to the title in height.

Examples of accordion titles


Do's & Don’ts

 example where buttons are included in an accord title with the text don't

Nesting Accordions

Nesting accordions is possible, but not recommended as it doesn't make for an easy drilling down interaction.

  • Accordions are not meant to be parent layers to content, but rather just sections that can be hidden and shown. 

  • If you need to nest accordions you might want to rethink the layout of the page.

Help make this page more useful.

Help make this page more useful.

Help make this page more useful.