Vivid Logo Vivid

Accordion

Accordion is an interactive element that works alongside Accordion Item to organise and display content in a collapsible and expandable way.

Heading

Use the heading attribute on Accordion Item to set the heading text.

To ensure accessible heading levels use the heading-level attribute.

Expand Mode

Use the expand-mode attribute on Accordion to determine if multiple items can opened at once or single (default).

Single

In single mode only one Accordion Item can be expanded at a time. By default, the first Accordion Item will be expanded when the component is initialized.

Multi

In multi mode multiple Accordion Items can be expanded.

Expanded

Use the expanded attribute on Accordion Item to set it's open state.

Appearance

Use the appearance attribute to change the Accordion Item appearance.

  • Type: 'ghost' | 'ghost-light' | 'filled'
  • Default: 'ghost'

Icon

The icon attribute displays an icon from the icon library, which prefixes the Accordion Item's heading.

The preferred way to add icons is to use the icon slot.

The icon prop is deprecated (as of 05/25) and directly replaced with icon slot. icon is still functional in the component but will be removed in a future major release. This will be communicated when it's removal becomes a release candidate at the end of the support period.

Icon Trailing

Use the icon-trailing attribute to postfix the icon in place of the Accordion Item's chevron.

Meta

Use the meta attribute to add meta data to the Accordion Item's heading.

Size

Use the size attribute to control the size of the Accordion Item.

No Indicator

Use the no-indicator attribute on Accordion Item to remove indicator icon from the heading element.