Accordion

Accordion groups a collection of contents in tabs.

PREVIEW

A simple accordion with expandable panels controlled via the value prop.

basic-demo

By default, a single panel is open at a time. Enable multiple to allow multiple panels to stay open.

multiple-demo

Control the active panel state with value and update:value.

This service helps you manage your projects more efficiently by offering real-time collaboration, task tracking, and powerful analytics.

controlled-demo

The trigger can be tailored per panel; the toggleicon slot animates a custom icon via the header's data-p attribute, while the asChild slot exposes onClick and active so the toggle can be rendered as any element, such as a Button.

Is my data secure?
trigger-demo

The toggleicon slot customizes the indicator. It can switch between two icons using the active context variable, or render a single icon that animates purely with CSS by targeting the header's data-p attribute.

Match open / closed

CSS-only with data attributes

indicator-demo

Set disabled on an AccordionPanel to prevent user interaction with that panel.

disabled-demo

Create accordion panels dynamically by iterating over a data source to keep structure consistent and reusable.

template-demo

RadioButton component can be used to group multiple AccordionPanel components.

Perfect for individuals getting started. Includes access to core components and community support.

radiobutton-demo

AccordionPanel can be generated dynamically using the standard v-for directive.

dynamic-demo

Screen Reader

Accordion header elements have a button role and use aria-controls to define the id of the content section along with aria-expanded for the visibility state. The value to read a header element defaults to the value of the header property and can be customized by defining an aria-label or aria-labelledby property. Each header has a heading role, for which the level is customized by headerAriaLevel and has a default level of 2 as per W3C specifications.

Disabled accordions headers use aria-disabled and are excluded from the keyboard navigation.

The content uses region role, defines an id that matches the aria-controls of the header and aria-labelledby referring to the id of the header.

Header Keyboard Support

KeyFunction
tabMoves focus to the next the focusable element in the page tab sequence.
shift + tabMoves focus to the previous the focusable element in the page tab sequence.
enterToggles the visibility of the content.
spaceToggles the visibility of the content.
down arrowMoves focus to the next header.
up arrowMoves focus to the previous header.
homeMoves focus to the first header.
endMoves focus to the last header.
Theme Designer