Expand / Collapse Widget Examples

A simple expandable region that reveals extra content.

An example that starts opened.

This panel starts open. Scripts that enhance the widget will set an explicit max-height during transitions so the open/close appears smoothly. When opened fully, the inline max-height is removed so long content can reflow naturally.

/* sample: how a script toggles attributes and max-height */