Order history
An order history composed from tables, badges, pagination and detail drawers.
Use an order history when customers need to scan past purchases and inspect a specific order without losing their place. This example combines a responsive table with a modal details drawer and explicit order-status labels.
The HTML tabs show essential markup; layout wrappers, repeated content, secondary details and demo behavior are omitted.
Recent orders
Keep order identifiers as row headers, use text labels for every status and place wide tables in a labelled, keyboard-scrollable region. Each details button opens a modal drawer whose name identifies the selected order.
Your orders
Orders placed between June and September 2026.
| Order | Placed | Items | Total | Status | Details |
|---|---|---|---|---|---|
| #1048 | 3 | €128.40 | Delivered | ||
| #1041 | 1 | €49.90 | In transit | ||
| #1026 | 2 | €86.00 | Processing | ||
| #1019 | 4 | €214.75 | Refunded | ||
| #1007 | 1 | €72.50 | Cancelled |
Essential markup
<section aria-labelledby="order-history-heading">
<h3 id="order-history-heading">Your orders</h3>
<div class="table-responsive" role="region" tabindex="0" aria-labelledby="order-history-heading">
<table class="table table-striped table-hover">
<caption>Most recent orders</caption>
<thead><tr><th scope="col">Order</th><th scope="col">Status</th><th scope="col">Details</th></tr></thead>
<tbody>
<tr>
<th scope="row">#1048</th>
<td><span class="badge bg-success">Delivered</span></td>
<td><button class="btn btn-text btn-primary" type="button" aria-controls="order-detail-1048"
aria-expanded="false" data-drawer-trigger>View details</button></td>
</tr>
<!-- Remaining orders and date, item-count and total columns omitted. -->
</tbody>
</table>
</div>
<!-- Pagination omitted. Each order targets its own labelled drawer. -->
<div class="drawer" id="order-detail-1048" role="dialog" aria-modal="true"
aria-labelledby="order-detail-1048-title" aria-hidden="true" inert>
<div class="drawer-header">
<p class="drawer-title h6" id="order-detail-1048-title">Order #1048</p>
<button class="icon-btn ms-auto" type="button" aria-label="Close order #1048 details" data-drawer-close>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="drawer-body">
<span class="badge bg-success">Delivered</span>
<p>Delivered on September 6, 2026 to Alex Morgan in Berlin.</p>
<!-- Item list omitted. -->
<p>Total: €128.40</p>
</div>
</div>
<div class="overlay" id="order-history-overlay" aria-hidden="true" data-drawer-close></div>
</section>