Vertically stacked collapsible sections. Composed from four elements:
and-accordion (the root), and-accordion-item (one trigger/content pair),
and-accordion-trigger, and and-accordion-content. The root injects the
shared expand/collapse logic into each item automatically — you don’t wire
anything yourself.
Is it accessible?Yes — it uses `aria-expanded`, `aria-controls`, and a `role="region"` panel, all driven by the headless core.Can multiple items be open?Only if you set `allow-multiple="true"` on the root — by default opening one item closes the others.
<and-accordionallow-multiple="false">
<and-accordion-itemvalue="item-1">
<and-accordion-trigger>Is it accessible?</and-accordion-trigger>
<and-accordion-content
>Yes — it uses aria-expanded, aria-controls, and a role="region"
panel.</and-accordion-content
>
</and-accordion-item>
<and-accordion-itemvalue="item-2">
<and-accordion-trigger>Can multiple items be open?</and-accordion-trigger>
<and-accordion-content
>Only if you set allow-multiple="true" on the root.</and-accordion-content
Unique value identifying this item. Auto-generated if omitted.
string
undefined
disabled
disabled
Whether this item is disabled (non-interactive, visually dimmed).
boolean
false
Note: at the time of writing, the generated `readme.md` in
`packages/web-components/src/components/and-accordion/` documents
`and-accordion-trigger` instead of the root `and-accordion` — several
compound components share a directory and Stencil's docs-readme output
writes all of them to the same `readme.md` filename, so only the
last-processed one survives. The tables above come from reading
`and-accordion.tsx`/`and-accordion-item.tsx` directly.