Skip to content

Accordion

Collapsible sections from an items array; one or multiple panels open (allow_multiple).

HTML tag: c-ef6ddd1948cd74ecfa8957659526a2fc2

  • expand/collapse FAQ or settings sections
  • stacked disclosure panels
  • show one or many open sections
PropTypeDefaultDescription
itemsArray
active_item_idString
allow_multipleBooleanfalse
fit_to_parentBooleanfalse
densityStringcomfortable
appearanceStringghost
toneStringneutral
sizeStringmd
  • Pass .items with panel metadata; slotted content per item in default slot.
  • Control open state via active_item_id or methods openItem/closeItem/getState.
  • Listen to accordion-toggle for open_ids changes.
  • Not for primary page navigation — use ab-tabs or ab-nav.
EventDetail
accordion-toggleitem_id: String, active_item_id: String
SignatureDescription
openItem(id: String)
closeItem(id: String)
getState()

Do not use for tabbed views (ab-tabs). Do not use as modal (ab-dialog).

<c-ef6ddd1948cd74ecfa8957659526a2fc2 .items=${sections} .allow_multiple=${false} @accordion-toggle=${onToggle}></c-ef6ddd1948cd74ecfa8957659526a2fc2>