Collapsed state
The accordion component has two main states: collapsed and expanded. The chevron icon at the end of the accordion indicates which state the accordion is in. The chevron points down to indicate collapsed and up to indicate expanded. Starting in a collapsed state gives the user a high level overview of the available information. Accordions begin by default in the collapsed state with all content panels closed.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
Expanded state
You can set one of the accordion items to be expanded by default. To render an accordion that’s expanded, add the .open
class on the .accordion
. For a consistent visual appearance and correct class name switching, you also need to remove .collapsed
class from the active .accordion-button
element. Note that only 1 accordion item can be expanded.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
Always open
Accordion component can be configured in a way that allows users independently expand each section of the accordion allowing for multiple sections to be open at once. To convert accordion to a list of collapsible elements, omit the data-bs-parent
attribute on each .accordion-collapse
to make accordion items stay open when another item is opened.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
Accordion as child component
.accordion-flush
to remove the default background-color
, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.