Skip to main content

Accordion

Expandable sections for FAQs and stacked content.

Usage

{% include components/accordion.html
   id="faq"
   items=page.faq_items
%}

Each item: { title, content, open }.

Example

Yes. Override the design tokens or add your own classes to customize the components.

Parameters

Parameter Type Description
id string Required. Group id
items array { title, content, open }
class string Extra classes

Add data-accordion-multiple on the root (via class wrapper or custom include) to allow multiple open panels. Default behavior closes other panels when one opens.

Accessibility

  • Triggers are real <button> elements
  • aria-expanded and aria-controls link trigger ↔ panel
  • Panels use role="region" and aria-labelledby