Collapse

A section that opens and closes. Stack them and you have an accordion, which is what Kobalte's Accordion renders: a heading with a trigger, then a region.

alpha The class names and states here are stable. The look is not: these styles can change in a minor release, without a major version bump.

ClassDoes what
collapseOne section, with a rule under it
collapse-titleThe trigger row
collapse-contentThe panel

Basic

<details> gives you this with no script. Kobalte gives you keyboard navigation across the whole stack, and marks the open item data-expanded.

<details class="collapse" open>
  <summary class="collapse-title">What is included? <span>−</span></summary>
  <div class="collapse-content">Everything in the free plan, plus unlimited projects.</div>
</details>
<details class="collapse">
  <summary class="collapse-title">Can I cancel? <span>+</span></summary>
  <div class="collapse-content">Any time, from the billing page.</div>
</details>

Kobalte's Trigger has no role of its own, so the binding reaches it as the button inside the heading that precedes a role="region". That is the most positional selector in the Kobalte layer.