Expand / Collapse Widget Examples

Each widget is wrapped with a div.example. The controlled content container uses the class details. The controls are accessible (aria-expanded, aria-controls, role=region).

This panel is shown by default. The script will compute and reveal it on load to match the aria-expanded state provided in the button.