---
title: Accordion
summary: Use accordion panels to group related content and show one section at a time.
description: Build collapsible content sections with accordion classes and modifiers.
related: [/ui/components/tab]
source: core/scss/ui/_accordion.scss
css-vars: accordion
classnames:
component:
- class: accordion
desc: Container element
part:
- class: accordion-item
desc: One collapsible section
- class: accordion-header
desc: Heading that holds the toggle button
- class: accordion-button
desc: The toggle itself
- class: accordion-body
desc: Panel revealed when the section opens
style:
- class: accordion-button-toggle
desc: Chevron indicator on the toggle
- class: accordion-button-toggle-plus
desc: Plus indicator that turns into a close icon when open
modifier:
- class: accordion-flush
desc: Removes the outer border and rounding, to sit flush in a parent
- class: accordion-inverted
desc: Moves the toggle indicator to the start of the header
- class: accordion-tabs
desc: Styles the headers as a row of tabs
---
import Example from '@components/Example.astro';
import Icon from '@ui/Icon.astro';
## Overview
Use `.accordion` as the wrapper and `.accordion-item` for each section. Inside each item, use `.accordion-header`, `.accordion-button`, `.accordion-button-toggle`, and `.accordion-body`.
Accordion interaction uses Bootstrap Collapse. Add `data-bs-toggle="collapse"` and `data-bs-target="#panel-id"` to each `.accordion-button`, then use `.accordion-collapse.collapse` on the target panel. Use `.show` on the panel that should be open by default.
This preview shows the base structure with one expanded section.
Update profile fields, contact details, and team role settings in this section.
Configure password policy, two-factor requirements, and active device sessions.
Choose which updates to receive by email, browser push, and weekly digest. You can set separate rules for account alerts and product announcements.
## Variants
### Plus toggle icon
Use `.accordion-button-toggle-plus` with a `plus` icon. When the section opens, the toggle rotates a quarter turn and the plus becomes a close icon. It rotates the whole toggle, so it works with an inline SVG, a sprite `