Accordion
Angular Bootstrap 5 Accordion component
Responsive Accordion built with Bootstrap 5, Angular and Material Design. Accordion is a vertically collapsing element to show and hide content via class changes.
Build vertically collapsing accordions in combination with our Collapse JavaScript plugin.
How it works
The accordion uses collapse internally to make it collapsible. To render an accordion that’s expanded, use [collapsed]="false"
on accordion item.
Basic example
Click the accordions below to expand/collapse the accordion content.
Flush
Use [flush]="true"
input to remove the default background-color
, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.
Borderless
Use [borderless]="true"
input to remove all the borders and add a background color to the active item.
.accordion-borderless
class. This is the first item's accordion body. .accordion-borderless
class. This is the second item's accordion body. Let's imagine this being filled with some actual content. .accordion-borderless
class. This is the third item's accordion body. Nothing more exciting happening here in terms of content, but just filling up the space to make it look, at least at first glance, a bit more representative of how this would look in a real-world application. Always open
Use [multiple]="true"
input to make accordion items stay open when another item is opened.
Disabled item
Add [disabled]="true"
input to accordion items you want to disable
Accessibility
Please read the collapse accessibility section for more information.