Accordion

Vertically stacked sections that expand to reveal their content, such as FAQs or grouped settings.
Stable
Web
iOS
Android
@advui/core
Source

FAQ (single, collapsible)

Yes. It follows the WAI-ARIA accordion pattern: headings, buttons and regions, with arrow-key navigation between sections.

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Accordion } from '@advui/core'

<Accordion type="single" collapsible>
  <Accordion.Item value="shipping">
    <Accordion.Trigger>How long does shipping take?</Accordion.Trigger>
    <Accordion.Content>Three to five working days.</Accordion.Content>
  </Accordion.Item>
</Accordion>

Examples

Card (multiple, disabled item)

Several sections can be open; rich triggers and content.

Email digests
Push notifications

API reference

Accordion

PropTypeDefaultDescription
type required'single' | 'multiple'—Whether one or several sections can be open at once.
valuestring | string[]—Open section (`single`) or sections (`multiple`), when you control them.
defaultValuestring | string[]—Sections open at first, when the accordion manages them.
onValueChange(value) => void—Called when sections open or close.
collapsiblebooleanfalseSingle mode: allow closing the open section.
variant'default' | 'card''default'Divided list or bordered surface.
disabledboolean—Disable every section.

Accordion.Item

PropTypeDefaultDescription
value requiredstring—Section id.
disabledboolean—Prevent opening this section.

Accordion.Trigger

PropTypeDefaultDescription
children requiredReactNode—Section title. Strings are styled for you.
level1 | 2 | 3 | 4 | 5 | 63Heading level around the trigger on web; match your page outline.

Accordion.Content

PropTypeDefaultDescription
children requiredReactNode—Section body. Strings are styled for you.

Accessibility

  • WAI-ARIA accordion: each trigger is a button with aria-expanded inside a heading, and each panel is a region labelled by its trigger.
  • Arrow keys move between triggers; disabled sections are skipped by the pointer and announced as disabled.
  • The open/close animation is skipped when the user prefers reduced motion.
Keyboard interactions
KeyAction
Enter / SpaceOpens or closes the focused section.
↓ / ↑Moves focus to the next / previous trigger.
Home / EndMoves focus to the first / last trigger.

Responsive behavior

Fills its container; set maxWidth to keep long lines readable.

Platform notes

Web
Triggers are wrapped in h3 headings by default (see level).
iOS
Triggers are exposed as buttons with their expanded state; heading wrappers are web-only.
Android
Same as iOS. With androidRipple (on in material()), presses show the native ripple.
Since v0.2.0Last updated Nov 2, 2026Edit this page on GitHub