Expand/Collapse Widget Demo

Two examples: a native details element and a custom collapsible widget. Each widget is wrapped with an element that has the class "example". The content container uses the class "details".

Native Details Widget

This content is controlled by the native HTML details element. Click the header to expand or collapse this section.

  • Uses the native browser toggle behavior.
  • The inner container has the class "details".
Custom Widget
Another Expandable Section