Accordion

The accordion is a UI component that lets users expand and collapse sections of content. It helps organise information into manageable chunks, keeping pages clean and reducing cognitive load.

DesignUsageAccessibilityUpdates

Purpose

Progressive disclosure

Accordion sections show only essential information upfront and reveal supporting details on demand.

Scan and prioritise

Accordion headings help users compare sections quickly before deciding what to expand.

Maintain context

Expanded content stays grouped beneath its trigger so users can stay oriented while reading.

Anatomy

Accordion title Badge
Accordion content
Second section
Accordion content
1

Title

2

Indicator (chevron)

3

Content panel (slot)

4

Divider

5

Leading icon (optional)

6

Badge (optional)

Configuration

Density

Density controls the spacing and visual weight of accordion items.

Accordion item 1
Content of accordion item 1
Accordion item 2
Content of accordion item 2
Accordion item 3
Content of accordion item 3

Standard spacing for most page content. Use it in typical layouts.

Border

Border controls whether the accordion uses a borderless or bordered container.

Accordion item 1
Content of accordion item 1
Accordion item 2
Content of accordion item 2
Accordion item 3
Content of accordion item 3

No outer shell around the accordion. Use it when the surrounding layout already provides structure.

Expansion

Expansion controls how many accordion items can stay open at the same time.

Accordion item 1
Content of accordion item 1
Accordion item 2
Content of accordion item 2
Accordion item 3
Content of accordion item 3

Keeps one section open at a time. Use it to keep the page compact and focused.

Slots

Slots control the optional content added to the accordion header.

Accordion item 1
Content of accordion item 1
Accordion item 2
Content of accordion item 2
Accordion item 3
Content of accordion item 3

Uses the standard header only. Use it for most content lists.

Playground

BETA
Accordion item 1
Content of accordion item 1
Accordion item 2
Content of accordion item 2
Accordion item 3
Content of accordion item 3
BorderExpansion

Structure

Accordion title
Accordion content

Component tokens

Component tokens are specific to each component. Use the table title as the prefix: hover-bg under sgds/accordion means sgds/accordion/hover-bg.

sgds/accordion
CategoryComponent tokenSemantic tokenValueColourhover-bgsgds/bg-translucent-subtleoklch(from #0E0E0E l c h / 0.05)title-colorsgds/color-default#1A1A1Aicon-colorsgds/color-subtle#525252Spacinggapsgds/gap/md16pxBorderborder-colorsgds/border-color-muted#DFDFDFborder-widthsgds/border-width/11pxborder-radiussgds/border-radius/md8px
sgds/accordion/default
CategoryComponent tokenSemantic tokenValueSpacingpadding-xsgds/padding/lg20pxpadding-ysgds/padding/lg20pxpadding-topsgds/padding/xs4pxpadding-bottomsgds/padding/lg20px
sgds/accordion/compact
CategoryComponent tokenSemantic tokenValueSpacingpadding-xsgds/padding/md16pxpadding-ysgds/padding/md16pxpadding-topsgds/padding/xs4pxpadding-bottomsgds/padding/md16px
sgds/accordion/spacious
CategoryComponent tokenSemantic tokenValueSpacingpadding-xsgds/padding/xl24pxpadding-ysgds/padding/xl24pxpadding-topsgds/padding/xs4pxpadding-bottomsgds/padding/xl24px

Semantic tokens

CategorySemantic tokenValueBackgroundsgds/bg-transparentTransparentColoursgds/color-default#1A1A1A

Usage

When to use

  • Use to group related information.
  • Use to reduce scrolling when content does not need to be shown at once.
  • Use when space is limited, such as on mobile or in side panels.

When not to use

  • Do not use when each section is short enough to show directly.
  • Do not hide essential information inside an accordion.

Best practices

What is your return policy?
Accordion content
Use sentence case

This keeps titles easy to scan.

WHAT IS YOUR RETURN POLICY?
Accordion content
Avoid all caps or mixed case

Inconsistent casing slows scanning.

Application eligibility
Accordion content
Required documents
Accordion content
Keep titles to one sentence

Short titles are easier to read at a glance.

This is a very long accordion title that makes the list harder to scan and understand quickly
Accordion content
Do not use long titles

Move supporting detail into the panel content.

What is your return policy?
Our return policy allows you to return items within 30 days of purchase for a full refund, provided they are unused and in their original packaging.
Match content to the title

Users should get what the heading promises.

What is your return policy?
Our store accepts a variety of payment methods, including major credit cards like Visa and MasterCard, as well as digital wallets such as PayPal and Apple Pay.
Avoid unrelated content

Off-topic panel content creates confusion.

Payment details
Accordion content
Supporting information
Accordion content
Declarations
Accordion content
Group related items

Use accordions for content that belongs together.

Parent accordion
Nested accordion
Nested content
Do not nest accordions

Multiple layers make navigation harder.

Accessibility considerations

Built-in accessibility

Each accordion trigger is a real button with expanded or collapsed state.

The component applies built-in ARIA attributes to connect the trigger with its content region.

  • Use the built-in accordion item instead of recreating the trigger and panel behaviour with custom markup.
  • The trigger exposes its expanded state and references the content it controls.
  • The panel content is exposed as a region, so use accordions for grouped sections rather than for every small detail on a page.

Labels and content

The header slot content becomes the visible label for the accordion trigger.

Write header text that is clear enough to stand on its own when announced as a button.

  • Use short, specific titles that describe the content inside each panel.
  • If the accordion sits under a page heading structure, apply heading markup around it consistently in the surrounding page content.

Focus and interaction

Interaction stays on a real button, with keyboard movement into interactive content inside an expanded panel.

  • After opening a panel, users should be able to continue tabbing into links, buttons, and form fields in a logical order.
  • Do not place essential actions in collapsed content if users need to reach them immediately.

Keyboard interaction

KeyInteractionTabMoves focus to the next accordion header or interactive element in the expanded content.Shift+TabMoves focus to the previous interactive element.EnterExpands or collapses the focused accordion header.SpaceExpands or collapses the focused accordion header.↓ Downor→ RightOpens the focused accordion header.↑ Upor← LeftCloses the focused accordion header.

Updates

DateVersionDescriptionLoading updates…

Roadmap

Planned itemStatusTargetMigrate component to new motion tokensIn progressNov 2025Add start/end slot flexibilityUnder reviewTBDImprove keyboard navigationPlannedQ1 2026

Feedback

Have suggestions or feedback?

Share them with us on Slack → #design-system-feedback

Bug Reports

Found a bug or issue?

Report it on GitHub Issues → sgds/components/accordion

Singapore Government Design System

The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.