Expand/Collapse Widgets

Examples of native and custom disclosure components. Each widget is wrapped in an example container and the controlled content is inside a details class.

Native Details/Summary

What is an expand/collapse widget?

An expand/collapse (also called disclosure) lets you reveal additional content on demand, helping keep interfaces clean and scannable.

  • Native <details> provides built-in semantics and keyboard support.
  • The <summary> element acts as the toggle control.
  • Use for FAQs, advanced options, and more.

Custom Accessible Disclosure

Multiple Sections