Expand / Collapse Widgets

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

Basic Expand/Collapse

Animated Expand/Collapse

Multiple Independent Sections

Each section is independent and uses the same role/attributes pattern.