Snippets Icons

Bootstrap 5 Order Tracking Progress Bar with Icons

A responsive order tracking progress bar with four delivery stages, a live status marker and a copyable tracking number.

Bootstrap 5 No jQuery Dec 2019 5.8K views

<section class="wdw-stage">
  <div class="container" style="max-width: 920px">
    <div class="wdw-card p-4 p-md-5">
      <div class="d-flex flex-column flex-sm-row justify-content-between gap-3 mb-4 mb-md-5">
        <div>
          <span class="wdw-eyebrow">Order tracking</span>
          <h2 class="wdw-heading h3 mb-1 mt-1">Order <span class="text-primary">#Y34XDHR</span></h2>
          <p class="wdw-muted small mb-0">Estimated arrival <strong class="text-body-emphasis">Fri, 12 Jan</strong></p>
        </div>
        <div class="text-sm-end">
          <span class="wdw-muted small d-block">USPS tracking number</span>
          <span class="d-inline-flex align-items-center gap-2 fw-bold text-body-emphasis font-monospace"><span id="trackNo">9400 1118 9922 3456 7890</span>
            <button type="button" class="btn btn-sm btn-outline-primary rounded-pill px-3" id="copyTrack" aria-label="Copy tracking number">Copy</button></span>
        </div>
      </div>

      <ol class="track list-unstyled m-0" id="track" aria-label="Order progress">
        <li class="track-step is-done">
          <span class="track-dot" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12 5 5 9-10"/></svg></span>
          <span class="wdw-icon track-icon"><svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="4" width="14" height="17" rx="2"/><path d="M9 4V3h6v1M9 11h6M9 15h4"/></svg></span>
          <span class="track-label"><strong>Processed</strong><small>Mon, 8 Jan</small></span>
        </li>
        <li class="track-step is-done">
          <span class="track-dot" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12 5 5 9-10"/></svg></span>
          <span class="wdw-icon track-icon"><svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 8 12 3 3 8l9 5 9-5ZM3 8v8l9 5 9-5V8M12 13v8"/></svg></span>
          <span class="track-label"><strong>Shipped</strong><small>Tue, 9 Jan</small></span>
        </li>
        <li class="track-step is-current" aria-current="step">
          <span class="track-dot" aria-hidden="true"><span class="track-pulse"></span></span>
          <span class="wdw-icon track-icon"><svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7h11v9H3zM14 10h4l3 3v3h-7"/><circle cx="7" cy="17.5" r="1.8"/><circle cx="17" cy="17.5" r="1.8"/></svg></span>
          <span class="track-label"><strong>On the way</strong><small>Out for delivery</small></span>
        </li>
        <li class="track-step">
          <span class="track-dot" aria-hidden="true"></span>
          <span class="wdw-icon track-icon"><svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m3 11 9-8 9 8M5 10v10h14V10M10 20v-6h4v6"/></svg></span>
          <span class="track-label"><strong>Delivered</strong><small>Expected Fri</small></span>
        </li>
      </ol>

      <div class="d-flex flex-wrap gap-2 mt-4 mt-md-5 pt-4 border-top">
        <button type="button" class="btn btn-primary rounded-pill px-4" id="advance">Advance status</button>
        <button type="button" class="btn btn-outline-secondary rounded-pill px-4" id="reset">Reset</button>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.