Toggle Sidebar B
header.lightDarkMode D

Accordion

Vertically stacked panels that expand to reveal their content. Built on reka-ui. Single-open by default; switch type to multiple to allow several at once.

Default

Single panel open at a time.

Multiple

Allow several panels open at once with type="multiple".

Controlled

Drive the open panel from outside via v-model.

Controlled from the buttons above.

API Reference

Props, events, and slots for each sub-component.

Accordion

Props

PropTypeDefaultDescription
type"single" | "multiple""single"Open one panel at a time, or many.
modelValuestring | string[]Open value(s). Supports v-model. String for single, array for multiple.
defaultValuestring | string[]Initial open value when v-model is not used.
collapsiblebooleanfalseAllow closing the only open panel (single mode).
disabledbooleanfalseDisable every item at once. Forwards to reka-ui AccordionRoot.

Events

EventDescription
update:modelValueFires when the open panel(s) change. Enables v-model.

Slots

SlotDescription
defaultAccordionItem children.

AccordionItem

Props

PropTypeDefaultDescription
valuestringUnique value to track open state.
disabledbooleanfalseDisable this item.

Slots

SlotDescription
defaultAccordionTrigger and AccordionContent.

AccordionTrigger

Props

PropTypeDefaultDescription
classstringExtra classes, merged with cn(). Forwards remaining props to reka-ui AccordionTrigger.

Slots

SlotDescription
defaultTrigger label content.
iconOverride the trailing chevron. Defaults to a rotating ChevronDown.

AccordionContent

Props

PropTypeDefaultDescription
forceMountbooleanfalseKeep content mounted while collapsed. Forwards to reka-ui AccordionContent.

Slots

SlotDescription
defaultPanel body revealed when open.

Accessibility

Keyboard shortcuts and ARIA behavior.

Keyboard

ShortcutDescription
TabMoves focus to the next trigger.
EnterToggles the focused panel.
SpaceToggles the focused panel.
Moves focus to the previous trigger.
Moves focus to the next trigger.
HomeMoves focus to the first trigger.
EndMoves focus to the last trigger.
  • Built on reka-ui; each trigger controls its region via aria-controls and aria-expanded.
  • Collapsed regions are hidden from assistive technology until expanded.