Accordion

Accordions are used to group similar content and hide or show it depending on user needs or preferences. Accordions give users more granular control over the interface and help digest content in stages, rather than all at once.

Usage

The accordion component delivers large amounts of content in a small space through progressive disclosure.

Do's

  • Displaying and grouping additional information.
  • To shorten pages and reduce scrolling when content is not crucial to read in full.
  • Adding granular control over the information on a given page.

Don'ts

  • When most of the content on the page is needed to answer user questions.
  • To display a list of clickable options, dropdown should be used instead.
  • Displaying critical system information or a primary action to be taken on the page. (for example: alerts, confirmation or cancellation buttons).

Placement and alignment

Placement

Accordions can be placed with main page content or placed inside of a container such as a side panel or tile.

Accordion placement
Accordion placement

Alignment

By default the chevron icon is placed on the end side of the header. This allows for the title on the start side to align with other type elements in the layout.

Accordion alignment

Left. Place chevron icon at the end of the accordion header.

Right. Don’t place caret icon on the left.

Behavior and interaction

The accordion component has two main states: collapsed and expanded. The chevron icon at the end of the accordion indicates which state the accordion is in. Accordions begin by default in the collapsed state with all content panels closed. Starting in a collapsed state gives the user a high level overview of the available information.

  • Trigger collapsed and expanded states when clicking on either the header or icon.
  • Use icons and animation to easily reflect collapsed and expanded states.
  • Use a chevron icon to indicate the expand/collapse behavior.
    • When the panel expands, the chevron icon rotates 180 degrees counterclockwise.
    • When the panel collapses, the chevron icon rotates 180 degrees clockwise.
Accordion trigger usage

Left. Trigger collapsed and expanded states when clicking on either the header or icon.

Right. Leave the header without caret or use a button to trigger the expand/collapse action.

Mobile

In small devices, extremely long pages are detrimental to the user experience. Collapsing information minimizes excessive scrolling and gives an overview of the structure and content available on the page.

  • In mobile use 100% of the available screen width.

Accordion group

Accordion headers are stacked vertically and different hierarchy levels are allowed.

The expandable section of an accordion group can contain different types of plain information or clickable components.

Accordion group placement
Accordion group placement

When one accordion panel is expanded, the rest of the group should be collapsed.

Content

The accordion component can contain other components, images, tables, and every custom feature that can be supported inside the element container.

Nesting and icon usage examples

Left. Nesting is allowed. Use in parent accordion Open Sans Semibold.

Right. Icons can be used as a complement to the header label.

Assistive text

Assistive text can be shown at the end of the accordion header when needed.

  • Icons and images can not be used.
  • Only add a assistive text when there is plenty space in the accordion header, in mobile devices is not displayed.
  • Try always to use a descriptive header so is no necessity to add extra information.
  • Assistive text content will be truncated 48px before reaching the accordion title. Title display has priority when space is limited.