Skip to content

Accordion

SAccordion is a set of collapsible sections. It is built on Reka UI (roles, keyboard navigation, aria-expanded). The single mode keeps one section open, multiple allows any number. Sections come from the items prop or from a slot with hand-written SAccordionItem elements (each section is a reusable item, the chevron is an SIcon). Expansion is controlled with v-model.

Single mode

Multiple mode

Use the slot and SAccordionItem for sections with arbitrary content.

Icons

The expand-icon prop of SAccordionItem sets the expand indicator icon (a registry name, plus here).

Disabled item

The disabled prop of SAccordionItem locks the section so it cannot be expanded.

Custom title

The #title slot replaces the title prop, so the header can hold an icon or any markup.

Collapsible single mode

In single mode the collapsible prop lets the user close the open section (without it, one section always stays expanded).

API

SAccordion

Props

NameTypeDefaultDescription
type"single" | "multiple""single"Mode: single expands one section at a time, multiple expands any number.
collapsiblebooleantrueIn single mode, allows collapsing the open section (closing all). Ignored in multiple.
items{ value: string; title?: string; content?: string; disabled?: boolean }[]undefinedSections (an alternative to the default slot with hand-written SAccordionItems).
disabledbooleanundefinedDisables the whole accordion.
squarebooleanundefinedSquare corners: removes the border radius (rounded by default).
model-valuestring | string[]undefinedExpanded section (single) or array of expanded sections (multiple). Two-way bound via v-model.

Events

NameSignatureDescription
update:modelValue( value: | string | string[] | undefined ) => voidEmitted when modelValue changes. Used for two-way binding (v-model).

Slots

NameDescription
defaultCustom set of SAccordionItem (instead of the items prop).

SAccordionItem

Props

NameTypeDefaultDescription
value*stringrequiredUnique item value within SAccordion (used to control expansion).
titlestringundefinedItem title (alternative to the title slot).
disabledbooleanundefinedDisables the item: it cannot be expanded or collapsed.
expand-iconstring"chevron-down"Expand indicator icon.

Slots

NameDescription
titleCustom item header (instead of the title prop).
defaultCollapsible item content.