An expand/collapse widget is a UI pattern that lets you hide non-essential information behind a toggle. It helps reduce visual clutter and allows users to progressively disclose details when they need them.
Using the native details element ensures keyboard accessibility and proper semantics out of the box.
Tip: Click or press Enter/Space on the summary to toggle visibility.