humanonlyweb/ui

Accordion

Expandable sections.

Markdown

Examples

Single

Orders ship within two business days and arrive in three to five.

Copy code

Multiple

With multiple, several items can be open at once.

Choose which updates reach your inbox.

Copy code

API

Accordion

PropTypeDefault
multiple

Allow several items open at once; v-model is then a string[].

booleanfalse
modelValue

Open item value, or values with multiple.

string | string[]—
EventPayload
update:modelValue

v-model:modelValue update.

[value: string | string[] | undefined]
SlotProps
default

<AccordionItem>s.

—

AccordionItem

PropTypeDefault
value*

Identifies the item in the accordion's v-model.

string—
title*

Header text. The title slot overrides it.

string—
disabled

Prevents toggling.

booleanfalse
level

Heading level wrapping the trigger, to fit the page's outline.

2 | 3 | 4 | 5 | 63
SlotProps
default

Panel content.

—
title

Replaces the title text.

{ open: boolean; }
indicator

Replaces the chevron.

{ open: boolean; }

Styling

Parts
accordion
Parts
accordion-itemaccordion-headingaccordion-triggeraccordion-titleaccordion-indicatoraccordion-panelaccordion-clipaccordion-content
States
data-accordion-open

Keyboard

KeysAction
Enter / SpaceToggle the focused item
↓ / ↑Move to the next / previous header
Home / EndMove to the first / last header

Accessibility

  • Set level so the headers fit your page's heading order.
  • Closed panels are skipped by Tab, but the browser's find-in-page still searches them and opens the one it matches.