Skip to main content

Storybook

Accordion

Groups related content into collapsible sections to reduce visual complexity. Use when page content can be meaningfully chunked into distinct sections. Don't use when all sections need to be visible simultaneously.

Figma Storybook Docs

Description

What it does

Reveals or hides content sections on demand, allowing users to focus on the information most relevant to them without scrolling through everything at once.

Where it appears

Detail pages, FAQ sections, settings panels, and consultation summaries in both Open Point and Social Point. Commonly used in stakeholder profile sidebars and community engagement response displays.

Why it exists

Government interfaces often present dense information across many categories — regulatory details, submission history, engagement stages. Accordions let teams surface that information progressively rather than overwhelming users with a wall of content.

Dependencies

Icon, Divider

Anatomy

PartRequired?Notes
Trigger / Header Required Clickable row containing the section label and expand/collapse indicator. Must be a focusable, keyboard-operable element. Minimum touch target 44x44px.
Indicator icon Required Chevron or plus/minus icon that rotates or toggles to signal the open/closed state. Should be decorative (aria-hidden) since state is conveyed via aria-expanded.
Content panel Required The collapsible region. Hidden via display:none or height:0 when collapsed; fully visible and in the tab order when expanded.
Divider Recommended Horizontal rule between accordion items. Provides visual separation without adding spacing overhead. Uses --op-color-border-default.
Section label Required Plain-language title describing the section contents. Should be short enough to read at a glance — aim for under 60 characters.
Supporting metadata (badge, count) Optional Secondary information displayed inline with the header, such as an item count or status badge. Does not replace the section label.

Variants

Default

Standard collapsible section with chevron indicator

Most cases — detail pages, FAQ, settings groupings

Flush

No outer border or card wrapper; relies on dividers only

When the accordion is embedded inside an existing card or panel and adding an outer border would create double borders

Bordered

Each item has its own visible border and subtle background

When accordions appear on a non-white background (e.g. a grey page canvas) and need clear affordance boundaries

Multi-expand

Multiple sections can be open simultaneously

Reference content or FAQs where users may need to compare information across sections. Avoid for step-by-step flows where sequence matters.

Single-expand (exclusive)

Opening one section automatically closes the others

Wizard steps, structured data entry, or anywhere only one section is actionable at a time

States

State Behaviour
Collapsed (default) Content panel is hidden. Trigger displays the section label and a downward-pointing chevron. aria-expanded='false' on the trigger.
Expanded Content panel is visible and participates in tab order. Chevron rotates 180deg (or switches to minus icon). aria-expanded='true' on the trigger.
Focus 3px focus ring using --op-color-interactive-focus appears around the trigger. Visible on keyboard navigation and pointer focus (unless :focus-visible is scoped).
Hover Trigger background shifts to --op-color-bg-subtle. Cursor changes to pointer. No delay.
Disabled Trigger is non-interactive. Opacity reduced to 40%. aria-disabled='true'. Do not use disabled accordions to hide required information — consider using a loading state or conditional rendering instead.
Loading Content panel shows a skeleton or spinner while async content resolves. Trigger remains interactive. Announce load completion to screen readers via aria-live region if content changes after initial render.

Usage guidelines

When to use

  • Displaying a stakeholder profile with multiple distinct information categories (contact details, engagement history, notes) where users rarely need all sections simultaneously.
  • FAQ or help content where users scan headings to find the one relevant answer.
  • Consultation submission detail pages where regulatory, timeline, and contact sections can be collapsed by default.
  • Settings panels with logically grouped options (notifications, privacy, integrations) that would otherwise produce excessive page length.

When not to use

  • When users need to compare content across sections simultaneously — use a table or side-by-side layout instead.
  • For critical action flows (e.g. a multi-step form submission) where hiding steps creates confusion about progress — use a stepper component instead.
  • When there is only one section — a single accordion is unnecessary complexity; use a heading and body text.
  • For navigation — use a sidebar nav or tabs. Accordions are content containers, not navigation patterns.
  • When the collapsed content is very short (1–2 lines) — the interaction overhead is not worth it; just show the content.

Do / Don't

Do

Write trigger labels as plain-language nouns or short phrases ('Contact details', 'Submission history') that accurately describe what is inside.

Don't

Use vague labels like 'More information' or 'Details' that don't help users decide whether to expand.

Do

Default the most commonly needed section to open if you know the user's primary task.

Don't

Default all sections to open — that defeats the purpose of the pattern.

Do

Keep content panel contents concise. If a panel contains more than a screenful of content, consider splitting it into separate pages or sub-sections.

Don't

Nest accordions inside accordion panels. This creates orientation problems and is difficult to navigate with a keyboard.

Do

Use consistent indicator icons across all accordion instances on the same page.

Don't

Mix chevron and plus/minus icons on the same page or within the same accordion group.

Was this page helpful?

Updated 9 September 2026