Note: Accordion is not yet in Elevate Lookbook — this is a proposed implementation following Elevate patterns
Default accordion with multiple panels that can be opened simultaneously
<div class="elv-accordion" data-accordion>
<div class="elv-accordion__item">
<button class="elv-accordion__header" aria-expanded="false" aria-controls="panel-1">
<span>What is G2's Review Verification process?</span>
<svg class="elv-accordion__icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" />
</svg>
</button>
<div class="elv-accordion__content" id="panel-1" aria-hidden="true" role="region">
<div class="elv-accordion__content-inner">
<div class="elv-accordion__body">
Content here...
</div>
</div>
</div>
</div>
</div>
Only one panel can be open at a time — opening a new panel closes the previous one
<!-- Add data-single-open="true" attribute -->
<div class="elv-accordion" data-accordion data-single-open="true">
<!-- accordion items... -->
</div>
Reduced padding for tighter layouts
<div class="elv-accordion elv-accordion--compact" data-accordion>
<!-- accordion items... -->
</div>
No outer border, only dividers between items
<div class="elv-accordion elv-accordion--borderless" data-accordion>
<!-- accordion items... -->
</div>
Start with one panel expanded by setting aria-expanded="true" and aria-hidden="false"
<!-- Set aria-expanded="true" and aria-hidden="false" on default open panel -->
<button class="elv-accordion__header" aria-expanded="true" aria-controls="panel-1">
<span>Default Open Panel</span>
<svg class="elv-accordion__icon">...</svg>
</button>
<div class="elv-accordion__content" id="panel-1" aria-hidden="false" role="region">
<!-- content... -->
</div>
<button> for headers — never divs or linksTab — Move focus to next accordion headerShift + Tab — Move focus to previous accordion headerSpace or Enter — Toggle accordion panelArrow Down — (Optional) Move focus to next headerArrow Up — (Optional) Move focus to previous headerHome — (Optional) Move focus to first headerEnd — (Optional) Move focus to last headeraria-expanded — "true" when panel is open, "false" when closedaria-controls — ID of the associated content panelaria-hidden — "false" when panel is visible, "true" when hiddenrole="region" — Identifies content panel as a landmark regionoutline-offset: -2px for clear keyboard navigation<!-- Full accessibility markup -->
<button class="elv-accordion__header"
aria-expanded="false"
aria-controls="unique-panel-id">
<span>Descriptive header text</span>
<svg class="elv-accordion__icon" aria-hidden="true">...</svg>
</button>
<div class="elv-accordion__content"
id="unique-panel-id"
aria-hidden="true"
role="region">
<!-- content -->
</div>
| Header Padding | 16px (default), 12px (compact) |
| Content Padding | 0 16px 16px 16px (when open) |
| Header Font | 16px/24px/600 (default), 14px/20px/600 (compact) |
| Body Font | 14px/20px/400 |
| Border | 1px solid #dfdfe2 (border-light) |
| Border Radius | 12px (radius-md) |
| Background | #ffffff (bg-neutral-0), hover: #f8f8f9 (bg-neutral-5) |
| Icon Size | 20px × 20px |
| Icon Rotation | 0deg (closed) → 180deg (open) |
| Transition Duration | 250ms (content), 200ms (icon), 150ms (hover) |
| Focus Outline | 2px solid border-focus, offset -2px |