Bootstrap 5 accordions are used to show and hide content in collapsible panels. This page covers 4 accordion patterns — basic, flush, always-open and custom styled — each commonly used in FAQ sections and content-heavy pages.
Quick Setup
Accordions require Bootstrap 5 JS bundle:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
Key Classes Reference
| Class | What It Does |
|---|---|
.accordion | Required wrapper element |
.accordion-item | Each collapsible panel |
.accordion-header | Header containing the toggle button |
.accordion-button | Clickable button that toggles the panel |
.accordion-button.collapsed | Collapsed state of the button |
.accordion-collapse | The collapsible content wrapper |
.accordion-body | Content inside the collapsible panel |
.accordion-flush | Removes borders and rounded corners |
.show | Makes a panel visible by default |
data-bs-parent | Links panels so only one is open at a time |
1. Basic Bootstrap 5 Accordion
A standard accordion where only one panel is open at a time. Click a heading to expand or collapse.
2. Bootstrap 5 Flush Accordion
Accordion without borders and rounded corners using accordion-flush. Blends into the page background.
3. Bootstrap 5 Always Open Accordion
Multiple panels can be open simultaneously by removing data-bs-parent. Each panel toggles independently.
4. Bootstrap 5 Custom Styled Accordion
Accordion with custom colors, icons and styling. Great for FAQ sections on landing pages.
Frequently Asked Questions
Need a Full Bootstrap 5 Admin Dashboard?
Get a complete Angular 21 + Bootstrap 5 dashboard with 50+ components — built by the same team behind BootstrapPlanet.
Browse Templates →Use code FIRST30 for 30% off your first purchase.