Accordions

Overview

Definition

A vertically stacked list of interactive headers that open or close related pieces of information.

There are three different types of accordions:

1. Simple
Most commonly used in side menus or filters and when space is at a premium

2. Small
Similar to Simple, and has an option to include an extra detail in the headline

3. Large
Commonly used for FAQs and when we have more space on the page.

Similar or related Components

Guidelines

These are used when there is a need to explain additional information without overwhelming people. By using progressive disclosure, accordions allow someone to get a general idea of the available options through brief headlines.

They can be used when the page length needs to be shorter. Since information is hidden, it should be used for supplementary information.

If any of the information in the accordion dropdown needs to be read, keep it with the main body copy.

Simple has the least visual noise, it should be used when it’s obvious there are interactive elements. This could be for grouping filters under a single section.

Icon right

Icon left

Small and Large have more visual noise. They are meant to draw more attention to themselves. The additional header text is for supplementary information. One example: a monetary figure. Then the calculation details can live in the dropdown.

Small
Large

Content

Do

Keep headlines short and concise.

Caution

Don’t let the accordion body copy get too long. It can cause people to lose track of their placement in the page.

Don’t

Don’t hide important information in the accordion body copy.

Visuals

Do

Have more than one accordion in a list. If you don’t, Expand View may be better.

Do

Someone can open more than one accordion at a time.

Caution

It’s okay to change the size and color of the text, just make sure they reach the appropriate contrast.

Don’t

Don’t change the icon color.

Don’t

Don’t change the icon.

Don’t

Don’t nest accordions within accordions.

Specs

Simple

ClosedHoverOpen
Padding8 8 8 4Right 4
Background color$white$blue-200$white
Border radius08 px0
Icon size24 px
Icon fill color$blue-800
Icon padding right or left (depends on the style)24 px
Header sizebody-small-500
Header color$ink-800
Body copy sizen/an/abody-small-300
Body copy colorn/an/a$ink-600

Small

ClosedHoverOpen
Padding4 8 8 8 Left 32
Background color$white$blue-200$white
Border radius08 px0
Border color$blue-100n/a$blue-100
Border bottom size2 px02 px
Icon size24 px
Icon fill color$blue-800
Icon padding-right8 px
Header sizebody-small-500
Header color$ink-800
Optional header sizebody-small-300
Optional header color$ink-800 (can change)
Optional header spacing24 px
Body copy sizen/an/abody-small-300
Body copy colorn/an/a$ink-600

Large

With the styling of the large size, the border radius changes if it’s the top, bottom, or in the middle.

TopMiddleBottom & Footer
Border radiusborder-radius-lg border-radius-lg 0 0 00 0 border-radius-lg border-radius-lg

The rest of the details remain the same between all placements.

ClosedHoverOpen
Paddingspacing-04 spacing-05 spacing-05 spacing-05Left 40
Background color$white$blue-200$white
Border color$blue-100$blue-200$blue-100
Border sizeborder-width-md
Icon size32 px
Icon fill colorblue-800
Icon padding-rightspacing-04
Header sizebody-large-500
Header color$ink-800
Optional header sizebody-large-300
Optional header color$ink-800 (can change)
Optional header padding-leftspacing-05
Body copy sizen/an/abody-medium-300
Body copy colorn/an/a$ink-600

Accessibility

  • Colors pass AA WCAG contrast, except for the underline. Since those are not the important part, it’s okay they don’t have the same contrast.
  • Can use with keyboard and assistive technology.