Expand / Collapse Widget Examples

Each widget is wrapped with a div.example. The controlled content uses a container with the class details. Buttons use aria-expanded and aria-controls for accessibility.

Simple details
Click the button to reveal additional content.
More elaborate content
Content includes text and a decorative image.
Accordion (single-open)
Only one section stays open at a time.