Skip to main content

BETANow in public beta.Public betaBeta

日本語Español

ACD-003 Published

Nested accordion

A two-level accordion: opening a large category reveals further items inside it that open and close in turn.

FigmaThis part is included in our free, editable Figma file: 235 website UI patterns across 32 parts, 2 designs each Open in Figma Community ↗ (opens in a new tab)

Wireframe (desktop) | Nested accordion

Nested accordion UI design (desktop wireframe)

Wireframe (mobile) | Nested accordion

Nested accordion UI design (mobile wireframe)

What changes on mobile

  1. Shallower indent on the second level: A deep indent in the narrow mobile width would run the text thin and tall.
  2. Pressable area kept on the second level: The text can shrink, but the height must stay easy to press with a finger.

Before you choose this pattern | Nested accordion

Good fit

  • The information divides into two levels: large categories and the items within them
  • Each category holds about two to five items
  • You want both the overview and the details on one page

Poor fit

  • Three or more levels (split into pages, going from a list to a detail page)
  • Only one category (<a href="/patterns/en/accordion-exclusive/">exclusive accordion</a>)

Why this wireframe works | Nested accordion

The overview first, then the details

Only the large categories show at first, so what is on offer can be taken in at a glance. Opening a category lists the items within, and opening one of those shows its details.

Item counts shown while closed

Each category heading carries the number of items inside, such as “3 services”, so the amount within can be judged before opening.

The levels told apart by look

The second level is indented with a line on the left, with smaller text and marks. Which level you are on is clear from position and size.

Heading hierarchy matched to the levels

First-level headings are h2 and second-level h3, so the hierarchy follows the levels. The relationship comes across to screen readers and heading navigation too.

Common mistakes | Nested accordion

Three or more levels

The deeper the nesting, the harder it is to tell what is open and the more closing there is to do. Keep to two levels and split anything deeper into pages.

The second level looking like the first

With the same size and position, an inner item is mistaken for the next category. Show the difference with indent, a line and text size.

Closing the first level resets the second

If every reopening of a category finds its items all closed again, readers must hunt for where they were. Decide whether the open state is kept.

Important information buried in the second level

Information that needs two opens to reach is rarely read. Put decision-critical information such as prices and conditions on the first level or on a separate page.

FAQ | Nested accordion

How many levels can an accordion have?

Two keeps readers from losing track of where they are. If a third is needed, give each category its own page and go from the list to a detail page.

Should the inner items be exclusive?

Where the inner items are compared, independent opening suits better. Where only one need be read, exclusive opening keeps the page from growing too tall.

Nested accordion or tabs?

With few categories and short names, the categories can be tabs with an accordion inside each. With many categories, or when they will not fit across a mobile screen, the nested accordion fits better.

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