Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Examples

Accordion

Accordion with multiple items.

Yes. It adheres to the WAI-ARIA design pattern.
Yes. It comes with default styles that matches the other components' aesthetic.

Code

<wdc-accordion>
  <wdc-accordion-item [open]="true">
    <div accordion-header>Accordion Item #1</div>
    <div accordion-body>Accordion Body #1</div>
  </wdc-accordion-item>
  <wdc-accordion-item>
    <div accordion-header>Accordion Item #2</div>
    <div accordion-body>Accordion Body #2</div>
  </wdc-accordion-item>
</wdc-accordion>

API Reference

InputTypeDefaultDescription
openbooleanfalseWhether the accordion item is open or not.
noPaddingBodybooleanfalseWhether to remove padding from the accordion body.
customActionsbooleanfalseWhether to display custom actions in the accordion header.