A container for a group of accordion items. It manages the overall state and interactions of the accordion, such as keyboard navigation and expansion mode.
element
HTMLElementA reference to the group element.
textDirection
anyThe text direction (ltr or rtl).
disabled
anyWhether the entire accordion group is disabled.
multiExpandable
anyWhether multiple accordion items can be expanded simultaneously.
softDisabled
anyWhether to allow disabled items to receive focus. When true, disabled items are
focusable but not interactive. When false, disabled items are skipped during navigation.
wrap
anyWhether keyboard navigation should wrap around from the last item to the first, and vice-versa.
expandAll
voidExpands all accordion panels if multi-expandable.
voidcollapseAll
voidCollapses all accordion panels.
voidDescription
A container for a group of accordion items. It manages the overall state and interactions of the accordion, such as keyboard navigation and expansion mode.
The ngAccordionGroup serves as the root of a group of accordion triggers and panels,
coordinating the behavior of the ngAccordionTrigger and ngAccordionPanel elements within it.
It supports both single and multiple expansion modes.
<div ngAccordionGroup [multiExpandable]="true" [(expandedPanels)]="expandedItems"> <div class="accordion-item"> <h3> <button ngAccordionTrigger panelId="item-1">Item 1</button> </h3> <div ngAccordionPanel panelId="item-1"> <ng-template ngAccordionContent> <p>Content for Item 1.</p> </ng-template> </div> </div> <div class="accordion-item"> <h3> <button ngAccordionTrigger panelId="item-2">Item 2</button> </h3> <div ngAccordionPanel panelId="item-2"> <ng-template ngAccordionContent> <p>Content for Item 2.</p> </ng-template> </div> </div></div>