Accordion (Disclosure)
Stacked headings that expand and collapse their content — the classic FAQ pattern.
Also known as: Disclosure
<details> + <summary>When to use it
For FAQs and long content people only read parts of.
Common mistake
Don’t hide information everyone needs.
Accessibility
Use real buttons for the headers and keep aria-expanded in sync.
Name in code
| HTML/CSS | <details> + <summary> |
|---|---|
| React | <Accordion> |
| Jetpack Compose | AnimatedVisibility (custom) |
| SwiftUI | DisclosureGroup |
Ready prompt for your coding agent
Add a Accordion (Disclosure) to this screen.
What it is: Stacked headings that expand and collapse their content — the classic FAQ pattern.
Implement with: <details> + <summary> (HTML/CSS).
Accessibility: Use real buttons for the headers and keep aria-expanded in sync.
When to use it: For FAQs and long content people only read parts of.
Avoid: Don’t hide information everyone needs.
Reuse the project's existing design tokens, spacing and component conventions.
Or compose a whole page from this element and others →
Prompts are in English for the most precise results with coding agents.