Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

Accordion

Stacked sections that expand to reveal their content.

Status
Ready
Code
In React
Role
Display

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

How long does a transfer take?
Most transfers arrive within a minute.
What are the limits?
Limits depend on your account type.

Pastes as editable layers. Shadows are not exported.

import { Accordion, type AccordionItem } from "@/ui";

const items: AccordionItem[] = [
  { title: "How long does a transfer take?", content: "Most transfers arrive within a minute.", defaultOpen: true },
  { title: "What are the limits?", content: "Limits depend on your account type." },
];

export default function AccordionDemo() {
  return <Accordion items={items} />;
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

These specimens are inert, so each one stays in the state it is labeled with.

Closeddefault
What are the limits?
Limits depend on your account type.
OpendefaultOpen
What are the limits?
Limits depend on your account type.
Long titlewraps, caret stays put
Can I send money to an account at another bank, and how long does that transfer take to arrive?
Most transfers arrive within a minute.

Pastes as editable layers. Shadows are not exported.

Props

items
AccordionItem[] · default none
One entry per section, in order.
items[].title
string · default none
The header text. It is also the React key, so titles must be unique within one accordion.
items[].content
ReactNode · default none
What shows when the item is open.
items[].defaultOpen
boolean · default none
Opens the item on first render. After that, the browser keeps the open state.
className
string · default ""
Extra classes for the outer container. Accordion takes no other attributes, so there is no ...rest.

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

🖍 Label
items[].title
Closest match: the header text of each item.
📝 Description
items[].content
Closest match: the body of each item. In code it can hold any content, not only text.
🎯 State
items[].defaultOpen
Open or closed on first render only. After that, the state is runtime.
☘️ Icon
None
No prop yet. The caret icon is fixed.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • Each header is a native summary element. Tab moves between headers, and Enter or Space opens or closes one.
  • Items are independent. Opening one does not close the others.
  • Links and fields inside a closed item cannot be reached with Tab until the item is opened.
  • This component draws no focus indicator of its own. On this site a global :focus-visible rule draws a 2px outline in the border/focus role (--color-role-border-focus). Copy the role tokens and that rule, or an equivalent, into your app.

Screen readers

  • Browsers expose each header as an expandable control with its open or closed state. The exact wording depends on the browser and screen reader.
  • The content of a closed item is hidden from screen readers.
  • Headers are not headings, so they do not appear in a screen reader's list of headings. The caret icon is aria-hidden.

What you still need to do

  • Give every item a unique title.
  • If the headers need to be in the page's heading outline, Accordion does not support that yet.

When to use

Long reference content, where people look for one section at a time.

Do and don't

Do

  • Write headers that describe what is inside.
  • Let the whole header row toggle the section.

Don't

  • Hide the only important content in a collapsed section.
  • Nest accordions inside accordions.

4 of 28 other molecules, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.