details element provides a built-in accessible disclosure widget. Clicking the summary toggles the visibility of the content inside. It supports keyboard interaction and preserves state on page refresh in some browsers.
Examples of native and scripted expand/collapse controls. Each widget is wrapped in an element with the “example” class, and the container for controlled content uses the “details” class.
details element provides a built-in accessible disclosure widget. Clicking the summary toggles the visibility of the content inside. It supports keyboard interaction and preserves state on page refresh in some browsers.
This section is controlled by the button above. The button updates its aria-expanded state and toggles the visibility of this content.