Skip to content

Accordion

Displays collapsible content panels for presenting information in a limited amount of space.

First release: 1.0.0 Latest update: July 1, 2025 Current version: 1.0.0

React Angular Vue Svelte HTML

Import

import { PlusAccordion } from '@plusui/react';
import { PlusAccordionComponent } from '@plusui/angular';
import { PlusAccordion } from '@plusui/vue';
import PlusAccordion from '@plusui/svelte';
<script src="https://cdn.jsdelivr.net/npm/@plusui/core"></script>

Package

@plusui/react
@plusui/angular
@plusui/vue
@plusui/svelte
@plusui/core

Docs

Changelog

Accordion Changelog

Recent changes and updates for the accordion component

v1.0.0

June 20, 2025
Feat

Added Accordion component for collapsible content

  • Individual accordion with expand/collapse
  • Group support with single/multiple expansion
  • Custom icons and animations
  • Accessibility with ARIA attributes

The Accordion component allows users to toggle the visibility of content sections. It’s often used for FAQs, settings panels, or anywhere information needs to be organized concisely. Individual accordion items (<plus-accordion>) should typically be wrapped in an <plus-accordion-group> for proper styling and behavior, especially when multiple items are present.

Accordion - anatomy

A single accordion item consists of a header and a panel. Clicking the header toggles the panel’s visibility.

Accordion Title
Accordion Content
Show code

Wrap multiple <plus-accordion> elements in <plus-accordion-group> for proper styling and interaction. By default, only one accordion within a group can be open at a time.

First Item
Content for the first item.
Second Item
Content for the second item.
Third Item
Content for the third item.
Show code

Set the multi attribute on <plus-accordion-group> to allow multiple accordion items within the group to be open simultaneously.

Initially Open Item
This item starts expanded because of the open attribute.
Another Item
This can be opened independently.
Show code

Use the size attribute on <plus-accordion-group> (or individual <plus-accordion> if not grouped) to control the overall size.

Accordion Item
Accordion content with different sizes.
Accordion Item
Accordion content with different sizes.
Accordion Item
Accordion content with different sizes.
Show code

Set the disabled attribute on <plus-accordion> to prevent it from being opened or closed.

Disabled Item
This content cannot be shown via UI interaction.
Show code
Accordion - layout spacing Accordion - light & dark mode
  • Keyboard Behavior:
    • When the accordion header has focus, Enter or Space toggles the accordion’s expansion state.
    • Accordion headers are included in the standard tab sequence.
    • Disabled accordions are skipped in the tab sequence.
  • Screen Reader:
    • The component uses role="button" for the header and role="region" for the panel.
    • aria-expanded indicates the state (true/false) of the accordion panel.
    • aria-controls links the header button to the panel it controls.
    • aria-disabled="true" is set on disabled accordion headers.
  • Required Developer Actions:
    • Ensure the content placed within the header slot is descriptive and clearly indicates the topic of the panel content.
    • Use <plus-accordion-group> when displaying multiple related accordion items for better structure and accessibility.
NameTypeDefaultDescriptionRequired
expandbooleanfalseWhether the accordion is expanded.No
size`‘sm''md''lg’`'md'
disabledbooleanfalseDisables the accordion.No
NamePayload TypeDescription
plus-accordion-toggleCustomEvent<{ expand: boolean }>Fired when the accordion is toggled.
NameDescription
headerThe header content (clickable part).
panelThe content displayed when the accordion is open.
helperOptional helper text displayed next to the header.
PartDescription
headerThe header container element.
panelThe panel container element.
iconThe expand/collapse icon element.
helperThe helper text container.
NameTypeDefaultDescriptionRequired
multibooleanfalseAllows multiple accordions to be open at once.No
kind`‘bordered''divided''separated’`'bordered'
size`‘sm''md''lg’`'md'
NameDescription
(default)Place <plus-accordion> elements here.
PartDescription
containerThe main container element for the group.

Join the Community

Plus UI is built by the community. Join us on our platforms to contribute, get help, and stay up to date.