Skip to content

Accordion

Stacked sections, each a header you press and the panel it reveals, on native details or the ARIA disclosure pattern.

  • .aparte-accordion
On this page
Open

A column of items, each a header and the panel it reveals. The header can be a native <summary> inside <details>, and then the browser opens and closes it, or a <div role="button" aria-expanded>, and then your code does. The chevron turns when the item is open, either way. The chat’s reasoning block is an accordion item on <details>.

It reads only the theme’s shared tokens, listed on the CSS variables reference.

.aparte-accordion · .aparte-accordion__header · .aparte-accordion__icon · .aparte-accordion__item · .aparte-accordion__panel · .aparte-icon

  • <details> and <summary> need nothing more: they are keyboard-operable and announce whether they are open.
  • With role="button", keep aria-expanded in step with the panel, and make the header focusable with tabindex="0" and Enter or Space.
  • Tabs — one section at a time, side by side.
  • Reasoning — a disclosure in a reply.