Skip to main content

Accordion

UI Design

What is an Accordion

An accordion is a list of headings that expand to reveal content and collapse to hide it. Users click a heading to open its panel, so long pages become short lists that are easy to scan.

Anatomy of an Accordion

  • Heading: The clickable title of each section
  • Icon: A caret or plus sign that shows open or closed
  • Panel: The content that appears when the section opens

When to use an Accordion

Use accordions for long content that users read selectively, such as FAQs, product details and settings, and on mobile where space is limited. Write headings that clearly describe each section, so users know which one to open.

Accordion drawbacks

Accordions hide content and add a click for every section. If most users need most sections, show the content openly instead. Make sure each heading works with a keyboard and tells screen readers whether it is expanded.

Frequently asked questions

When should you use an accordion?

On long pages where users need only some sections, such as FAQs, product details or settings, and on mobile screens where space is tight. Clear headings let users jump to what they need.

When should you avoid accordions?

When most users need most of the content. Each collapsed section adds a click and hides information, so NN/g advises against accordions on desktop pages where users would open several of them.

How do you build an accessible accordion?

Make each heading a button that shows whether its panel is expanded, and let keyboard users open it with Enter or Space. On the web, the HTML details and summary elements give a simple built-in version.