An expandable order summary should show the important total even while its line items are collapsed. Expanded rows need readable labels for adjustments.
Worked example
<details open>
<summary>Order total · $46</summary>
<dl class="grid">
<div>
<dt>Notebook</dt>
<dd>$40</dd>
</div>
<div>
<dt>Delivery</dt>
<dd>$6</dd>
</div>
</dl>
</details>Implementation notes
A summary total must include the same adjustments as its expanded details. A stale compact total undermines trust even if the individual rows are correct.
Try it yourself
Add a discount and compare the compact and expanded totals.
Open the UI Components example →Editorial date July 20, 2025 · Published December 6, 2026