Accordion

Collapsible panels for progressively disclosing content. Use when you have grouped information that doesn't need to be visible at once — FAQ lists, settings sections, nested details, filter groups. Avoid for primary navigation; use tabs or nav instead.

a11y (built in): triggers are real <button>s, so Enter/Space and the native disabled attribute work without extra wiring. The controller pairs each trigger with its panel — aria-expanded + aria-controls on the trigger, role=region + aria-labelledby on the panel — and collapses with the hidden attribute, so a closed panel leaves both the tab order and the accessibility tree. Chevrons are aria-hidden; every trigger is its own tab stop (no roving tabindex) with a :focus-visible ring.

Usage: Set data-lb-accordion on the root. Each item needs a .lb-accordion__trigger button and matching .lb-accordion__panel. The trigger's right cluster (.lb-accordion__indicators) holds an optional .lb-counter count + chevron.


Accordion Demo

letbe-ds is a framework-agnostic design system using pure CSS and vanilla JavaScript, driven by tokens exported from the letbe Figma plugin. No build tools required.
Yes! Since it's pure CSS + vanilla JS, it works with React, Vue, Svelte, PHP, Django, or plain HTML.
This content is hidden.

With leading icons

Add an optional .lb-accordion__icon slot before the label — useful for category-style accordions (settings panels, theme editors, sidebar groups) where each section has a recognisable visual anchor. Inherits trigger color, so disabled/hover states flow through.

Brand color, accent palette, surface tinting.
Font family, base size, density, hierarchy contrast.
Action stroke, decorative stroke, icon stroke.
Square, soft, rounded, pill — remaps L2 radius aliases to L1 primitives.

Filter accordion — with count badges

Reuses the shared Counter (.lb-counter) to show how many filters are active inside a collapsed section.

No owners selected. Start typing to filter.