Expand/Collapse Widget Demo

Wraps each widget in an example container and uses a details-class container for the controlled content.

This widget demonstrates a simple expand/collapse interaction. Click the button to reveal or hide the content that follows. The content container uses the "details" class as requested.

Clicking the button toggles a CSS class that shows or hides the content. This keeps the structure accessible and simple, with ARIA attributes indicating the current state.

This third widget demonstrates that you can have multiple independent expand/collapse sections on the same page, each wrapped in its own example container.