--- 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 `` or an icon font.

View invoices, payment method status, and tax details.
### With leading icon Use `.accordion-button-icon` when a row needs a small icon before the label. The icon color uses the secondary token.

Manage member names, avatars, and workspace profile details.
### Flush accordion Use `.accordion-flush` to remove side borders and border radius. The first and last items also remove top and bottom borders.

Generate tokens and control access scopes.

Manage delivery URLs, retry policy, and event subscriptions.
## Examples ### Tab-like spacing Use `.accordion-tabs` to add a gap between items and keep full borders around each item. This style works well for settings pages.

Configure workspace name, slug, and timezone.

Control email, push, and digest notification preferences.
### Inverted toggle position Use `.accordion-inverted` to move the toggle to the start of the button row. This helps layouts where controls should appear before text.

Set default policy, invite flow, and sign-in restrictions.
## Accessibility - Use a real `