Accordion

The accordion component is a vertical stack of interactive headers used to group related content into collapsible sections, allowing users to expand or hide content based on their needs or preferences. It enhances the user experience by organizing information into smaller, digestible chunks, helping reduce cognitive load and save screen space.

Specifications

Accordion design specifications
Accordion design specifications

States

The accordion header can get four different states based on user interaction. States: enabled, hover, focus and disabled.

Accordion states
Accordion states

Anatomy

Accordion anatomy
  1. 1.
    Header
  2. 2.
    Left secondary element (Optional)
  3. 3.
    Title
  4. 4.
    Sublabel
  5. 5.
    Right secondary element (Optional)
  6. 6.
    Caret icon (Expand/collapse)
  7. 7.
    Content area

Design tokens

Color

Component tokenElementCore tokenValue
accordionSeparatorBorderColorSeparatorcolor-grey-200#e6e6e6
accordionSeparatorBorderThicknessSeparator-1px
accordionSeparatorBorderStyleSeparatorborder-style-solidsolid
activeBackgroundColorHeader background:activecolor-purple-100#f2eafa
arrowColorCaret iconcolor-purple-700#5f249f
assistiveTextFontColorAssistive textcolor-grey-700#666666
backgroundColorContainer backgroundcolor-white#ffffff
disabledArrowColorCaret icon:disabledcolor-grey-500#999999
disabledAssistiveTextFontColorAssistive text:disabledcolor-grey-500#999999
disabledIconColorCustom icon:disabledcolor-grey-500#999999
disabledSubLabelFontColorSublabel:disabledcolor-grey-700#999999
disabledTitleLabelFontColorTitle:disabledcolor-grey-500#999999
focusBackgroundColorHeader background:focuscolor-transparenttransparent
focusBorderColorHeader outline:focuscolor-blue-600#0095ff
hoverBackgroundColorHeader background:hovercolor-purple-100#f2eafa
iconColorCustom iconcolor-purple-700#5f249f
subLabelFontColorSublabelcolor-grey-500#999999
titleLabelFontColorTitlecolor-grey-900#333333
boxShadowColorContainer shadowcolor-grey-200-a#0000001a

Typography

Component tokenElementCore tokenValue
assistiveTextFontFamilyAssistive textfont-family-sans'Open Sans', sans-serif;
assistiveTextFontSizeAssistive textfont-scale-010.75rem / 12px
assistiveTextFontStyleAssistive textfont-style-normalnormal
assistiveTextFontWeightAssistive textfont-weight-light400
subLabelFontFamilySublabelfont-family-sans'Open Sans', sans-serif
subLabelFontSizeSublabelfont-scale-010.75rem / 12px
subLabelFontStyleSublabelfont-style-normalnormal
subLabelFontWeightSublabelfont-weight-normal400
titleLabelFontFamilyTitlefont-family-sans'Open Sans', sans-serif
titleLabelFontSizeTitlefont-scale-031rem / 16px
titleLabelFontStyleTitlefont-style-normalnormal
titleLabelFontWeightTitlefont-weight-regular400

Iconography

Component tokenElementCore tokenValue
iconSizeCustom icon/Caret icon-24x24px

Border

Component tokenElementCore tokenValue
borderRadiusAccordion containerborder-radius-medium0.25rem / 4px
focusBorderStyleHeader:focus borderborder-style-solidsolid
focusBorderThicknessHeader:focus borderborder-width-22px

Margin

Margin properties can be applied independently to top, right, bottom and left sides of the card container.

MarginValue
xxsmall4px
xsmall8px
small12px
medium16px
large24px
xlarge32px
xxlarge48px

Accessibility

WCAG 2.2

WAI-ARIA 1.2

Usability known issues

Printing

Accordions are often not well suited for printing documents and require people to print snippets of content at a time.