Shown on the clickable row
Shown on the clickable row
Shown on the clickable row
Revealed when the section opens
Revealed when the section opens
Revealed when the section opens
Base class of the pattern
Any CSS colour
Between sections
Summary text
Arrow, hover tint, focus ring
0–24
How many rows to generate
Live preview — select a heading to open it
What is an accordion?
A stack of headings where each one reveals its own panel of content.
Why use details and summary?
The pattern is native HTML, so it works with the keyboard before any CSS loads.
Can I add more sections?
Copy one details block, change the heading and text, and the styles keep working.
Built from native
<details> and <summary>, so headings are real buttons for keyboards and screen readers even before the CSS loads. Opening plays a short fade (disabled for reduced-motion visitors); closing is instant, which is how the native element behaves. The exclusive option uses the name attribute — browsers that do not support it simply keep several sections open. Generated in your browser.