Layout
Accordion
Also calledexpandable sectionsdisclosure listprogressive disclosure
A stack of headings that expand or collapse their own content in place.
How people describe it
- “sections that expand when you click”
- “stack of questions that reveal answers”
- “rows with arrows that open more text underneath”
Good for
- Frequently asked questions
- Optional details in a long page
Don’t mix it up with
Switches between panels instead of expanding content under each heading.
What your library calls it
| LIBRARY | CALLS IT |
|---|---|
| shadcn/ui | Accordion |
Accessibility checklist
- Use native details/summary or buttons with aria-expanded
- Keep headings operable with Enter and Space
- Keep collapsed content out of the tab order
Try it
A stack of headings that each expand to reveal more content.
When content is long and most people only need one or two parts of it.
Yes. Switch the mode to Multiple and open more than one.
Open and close sections. Switch to Multiple to keep several open.
Settings
Prompt
Add an accordion with keyboard-operable headings that expand and collapse content.
~21 estimated prompt tokensDetailed: ~55 estimated prompt tokens
Rough estimate for prompt text only; actual counts vary by model and context.
<details>
<summary style="min-height:44px; cursor:pointer">When will my order arrive?</summary>
<p>Delivery takes three to five business days.</p>
</details>
<details>
<summary style="min-height:44px; cursor:pointer">Can I return my order?</summary>
<p>Unused items can be returned within 30 days.</p>
</details>Used in
Explore website blueprints that use this component.