Skip to main content

BETANow in public beta.Public betaBeta

日本語Español

ACD-002 Published · Updated

Accordion with expand all

A design that places "Expand all" and "Collapse all" buttons above the accordion so the items can be opened and closed together.

Wireframe (desktop) | Accordion with expand all

Accordion with expand all UI design (desktop wireframe)

Wireframe (mobile) | Accordion with expand all

Accordion with expand all UI design (mobile wireframe)

What changes on mobile

  1. The two buttons side by side across the full width: Beside the text on mobile they would be too small to press, so they get a comfortable size.
  2. Dates aligned left: Right-aligned in a narrow width, a wrapped date is hard to read.

Before you choose this pattern | Accordion with expand all

Good fit

  • Some readers skim and some read everything
  • Terms of use, specifications, notes: many items, tedious to open one by one
  • The content is sometimes printed or saved

Poor fit

  • Three items or fewer, with no need to open them together (<a href="/patterns/en/accordion-exclusive/">exclusive accordion</a>)
  • Almost everyone reads the whole thing (<a href="/patterns/en/faq-full-list/">full-list FAQ</a>)

Why this wireframe works | Accordion with expand all

Readers who want everything open it in one press

“Expand all” shows the full text without opening items one by one. The same page offers a closed list to skimmers and the full text to those who want to check everything.

Shows how many are open

Beside the buttons it reads “2 of 6 sections open”. How far you have got, and whether anything is still closed, can be checked without scanning the screen.

Buttons that cannot be pressed look it

When everything is open, “Expand all” is disabled; when everything is closed, “Collapse all” is. No button is left that does nothing when pressed.

Everything opens for printing

Terms and specifications are sometimes printed to check. Every item opens just before printing, so no closed item drops off the paper.

Common mistakes | Accordion with expand all

One button that toggles between expand and collapse

When the same button’s text swaps between “Expand all” and “Collapse all”, the current state is easy to misread. Use two buttons, or convey the change of state in the text and to screen readers.

Buttons far from the accordion

Placed high on the page or elsewhere, it is unclear which list the buttons control. Put them right above the list, beside the item count.

Closed items missing from the printout

Printed closed, the page is a list of headings. Open everything just before printing, or show the bodies in the print stylesheet.

Losing the controls after expanding all

Expanding all makes the page much longer, and the button that was pressed can be hard to find again. After a press, move focus to the other button so collapsing can follow.

Open/closed state not restored after printing

For printing, prefer showing the content with print CSS. If you open items on beforeprint, record their state and restore it on afterprint.

FAQ | Accordion with expand all

Where should the expand-all button go?

Right above the accordion list, beside the item count. Placed away from the list, it is unclear which list it controls.

Can the two buttons be combined into one?

A single button whose text switches is one approach. In that case, convey the change of state after pressing in both the text and to screen readers. To avoid confusion, two buttons are clearer.

Can terms of use go in an accordion?

It makes skimming easier, but closed items may be skipped. For terms you want read in full, add an expand-all button and make sure the full text appears when printed or saved.

Related pages

Share this pattern

Send this page to your team or your design partner.

Was this pattern useful?

Written by

Yuta Okano

ENVY DESIGN Inc.

CEO / Director / Designer

14 years in the web industry. Has worked on more than 500 web projects, from corporate and recruiting sites to e-commerce. Focuses on information architecture, direction and design, from planning websites to improving them. In recent years he has focused on AIO (AI optimization) and GEO, helping sites get cited by generative AI search such as ChatGPT, Perplexity and Google AI Overviews.

Review and revision history

  1. Published AvatarYuta Okano Pattern published