Expand/Collapse Widget Examples

Custom (button controls a panel)

Native (<details> / <summary>)

More information
This uses the browser’s built-in expand/collapse behavior. The inner content is still wrapped in a details class container to match the requirement.

Accordion (only one open)

Only one accordion section stays open at a time.