<details> Accordion Playground

The Balai’s FAQ from your own <details>: try a click, Enter and Space, give several drawers the same name, and see what the browser does; every toggle event…

Why it matters

FAQs, settings panels, side menus: disclosures are everywhere. <details> comes with clicks, Enter and Space for free, reads to a screen reader as a button that is open or closed, and keeps its content in the DOM. The name attribute removes one classic JS pattern: the accordion where only one may be open.

The key idea

The name attribute makes an exclusive accordion without JS

Common mistakes

Try it in this playground