Examples of both a custom button-controlled region and a native details/summary component.
This section is revealed when the button is activated. It demonstrates controlling visibility via the hidden attribute.
aria-expanded state.details class.Tip: You can style the button state using the [aria-expanded] attribute selector.
The native <details> element provides toggle behavior without JavaScript.
details class.aria-expanded on the summary via script.Use CSS to customize the summary marker and transition styles.
An overview section with general notes.
div.example.details class.Advanced settings and options.
aria-controls connects control to content.aria-labelledby.hidden attribute.