Expand/Collapse Widget Demo

What is an expand/collapse widget?
An expand/collapse widget reveals or hides additional content when the summary line is clicked. This example uses native HTML details and summary elements to demonstrate the behavior.
Tips for keyboard usage
- Focus the summary with Tab and press Enter or Space to toggle. - Use Shift+Tab to move backward between widgets.
Pre-opened panel (starts expanded)
This panel starts in the open state because the open attribute is present on the details element.