Skip to main content

Accordion

An accordion is a container that contains a header and a body that is revealed/hidden when toggled. When more than one accordion is used, it stacks vertically with no spacing.

click to activate accordion

Anatomy

Note: Accordion has no background color

Legend

  1. Border
  2. Accordion heading
  3. Accordion body
  4. Chevron Icon

Options

Default Open

The accordion can be opened by default.

You can see the content inside

Behavior

Opening

The accordion can only have one item open at a time.

Keyboard Interactions

The accordion can be tabbed through and use return/enter to open or close the accordion.


Usage Guidelines

Avoid splitting content

The header of the accordion should be a complete sentence or statement. It should never continue inside of the body of the accordion.


Close

Container width vs headline width

When possible, the container of the headline should be bigger to avoid it getting too close to the chevron. This can be avoided with enough container space or concise headlines.


Alert


Specs

Size

The accordion will take up the width of the container and the height of the content with the header.

Spacing

The accordion has no left or right spacing but has fixed spacing between header, and the body. The body also has a 16px bottom padding.

measured in pixels

Component Checklist

Check
Accessibility

Visual information required to identify components and states (except inactive components) has a contrast ratio to meet WCAG 2.0 level AA. This exclude text contrast requirements. Unless disabled text should always be accessbile.

Check
States are defined

Includes all interactive states that are applicable (hover, down, focus, keyboard focus, disabled).

Check
Specs are defined

Sizing, spacing, and other visual styles have been outline in documentation and the coded component has been VQA to match

Check
Works with all supported color themes

Considerations have been made to think in darkmode, lightmode, button themes and other applicable themes

Check
Options are defined

Includes relevant options (variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.)

Check
Behaviors are defined

Includes guidelines for keyboard focus, layout (wrapping, truncation, overflow), animation, interactions, etc.

Check
Design component created

A equivalent design component as been created matching as best as possible to properties found in the coded component.

Check
All web screen sizes

Component can scale for all platforms mobile, tablet, and desktop.

Works on Homepage sizes

Component has an opinion on how it scales on Homepage columns and other modular layouts.

Works in apps

Component can be used in iOS and Andriod or has an equivalent app component

Check
Keyboard interactions

Follows WCAG 2.0 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions.

Check
Design tokens

All design attributes (color, typography, layout, animation, etc.) are available as design tokens.

Check
Web Vitals

Meets minimum requirements to ensure minimal impact to Web vitals. (Skeleton loads, Animations, Avoid layout shift, etc.)