Timelines

Timelines

Timeline

  1. Delivered, Garage / Other Door / Other Location at Address
  2. Fulfillment updated by the warehouse
    Carrier
    UPS Ground
    Tracking number
    1Z999AA10123456784
  3. James Trapero

    Customer asked for delivery to the side door. Passed on to the carrier.

  4. Out for Delivery
  5. Order placed
<div class="card">
<header>
<h2>Timeline</h2>
<div class="card-action">
<button type="button" class="btn" data-variant="outline" data-size="sm" onclick="const note = document.getElementById('demo-timeline-note'); note.hidden = false; note.querySelector('textarea').focus()">Add Note</button>
</div>
</header>
<section>
<ol class="timeline">
<li id="demo-timeline-note" hidden>
Add a note
<form onsubmit="event.preventDefault(); this.closest('li').hidden = true">
<textarea class="textarea" name="note" placeholder="Add order note..." aria-label="Add a note"></textarea>
<footer>
<button type="submit" class="btn" data-size="sm">Save</button>
<button type="button" class="btn" data-variant="outline" data-size="sm" onclick="this.closest('li').hidden = true">Cancel</button>
<small>Notes are only editable for 5 minutes after being saved.</small>
</footer>
</form>
</li>
<li>
Delivered, Garage / Other Door / Other Location at Address
<time datetime="2025-03-26T16:36">March 26, 2025, 4:36 p.m.</time>
</li>
<li>
<details>
<summary>Fulfillment updated by the warehouse<i class="icon icon-chevron-down" aria-hidden="true"></i></summary>
<dl>
<dt>Carrier</dt>
<dd>UPS Ground</dd>
<dt>Tracking number</dt>
<dd>1Z999AA10123456784</dd>
</dl>
</details>
<time datetime="2025-03-25T09:12">March 25, 2025, 9:12 a.m.</time>
</li>
<li data-variant="note">
<article>
<h4>James Trapero</h4>
<time datetime="2025-03-24T06:29">March 24, 2025, 6:29 a.m.</time>
<p>Customer asked for delivery to the side door. Passed on to the carrier.</p>
</article>
</li>
<li>
Out for Delivery
<time datetime="2025-03-24T06:02">March 24, 2025, 6:02 a.m.</time>
</li>
<li>
Order placed
<time datetime="2025-03-22T18:40">March 22, 2025, 6:40 p.m.</time>
</li>
</ol>
</section>
</div>

Usage

  1. Payment captured
  2. Order placed
<ol class="timeline">
<li>
Payment captured
<time datetime="2025-03-22T18:41">March 22, 2025, 6:41 p.m.</time>
</li>
<li>
Order placed
<time datetime="2025-03-22T18:40">March 22, 2025, 6:40 p.m.</time>
</li>
</ol>

An event that opens to show details

  1. Refund issued
    Amount
    $24.00
    Reason
    Item arrived damaged
  2. Delivered
<ol class="timeline">
<li>
<details open>
<summary>Refund issued<i class="icon icon-chevron-down" aria-hidden="true"></i></summary>
<dl>
<dt>Amount</dt>
<dd>$24.00</dd>
<dt>Reason</dt>
<dd>Item arrived damaged</dd>
</dl>
</details>
<time datetime="2025-03-28T10:05">March 28, 2025, 10:05 a.m.</time>
</li>
<li>
Delivered
<time datetime="2025-03-26T16:36">March 26, 2025, 4:36 p.m.</time>
</li>
</ol>

data-variant="destructive" marks an error: its text is red

  1. Subscription renewal payment failed.
    Reason
    Card declined
  2. Uploaded tracking information failed.
  3. Subscription status changed from Active to Past Due by System.
<ol class="timeline">
<li data-variant="destructive">
<details open>
<summary>Subscription renewal payment failed.<i class="icon icon-chevron-down" aria-hidden="true"></i></summary>
<dl>
<dt>Reason</dt>
<dd>Card declined</dd>
</dl>
</details>
<time datetime="2026-06-05T06:09">June 5, 2026, 6:09 a.m.</time>
</li>
<li data-variant="destructive">
Uploaded tracking information failed.
<time datetime="2026-06-04T14:20">June 4, 2026, 2:20 p.m.</time>
</li>
<li>
Subscription status changed from Active to Past Due by System.
<time datetime="2026-06-05T06:09">June 5, 2026, 6:09 a.m.</time>
</li>
</ol>

The steps of a job: an icon or a spinner first in an event takes the dot's place, and data-variant="pending" is a step not started

  1. Creating your account
  2. Initializing your store
  3. Applying store settings
<ol class="timeline">
<li>
<i class="icon icon-circle-check text-success" aria-hidden="true"></i>
Creating your account
</li>
<li aria-busy="true">
<span class="spinner" data-size="xs" role="status" aria-label="In progress"></span>
Initializing your store
</li>
<li data-variant="pending">
Applying store settings
</li>
</ol>

Steps played by a script: the step being done swaps its spinner for a check, then the next step starts

  1. Creating your account
  2. Initializing your store
  3. Applying store settings
<div class="flex flex-col items-start gap-4">
<ol class="timeline" id="demo-timeline-steps">
<li data-variant="pending">Creating your account</li>
<li data-variant="pending">Initializing your store</li>
<li data-variant="pending">Applying store settings</li>
</ol>
<button type="button" class="btn" data-variant="outline" data-size="sm" id="demo-timeline-steps-play">Play</button>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
const steps = [...document.querySelectorAll("#demo-timeline-steps > li")];
const play = document.getElementById("demo-timeline-steps-play");
const spinner = '<span class="spinner" data-size="xs" role="status" aria-label="In progress"></span>';
const check = '<i class="icon icon-circle-check text-success" aria-hidden="true"></i>';
const start = (step) => {
step.removeAttribute("data-variant");
step.setAttribute("aria-busy", "true");
step.insertAdjacentHTML("afterbegin", spinner);
};
play.addEventListener("click", () => {
play.disabled = true;
steps.forEach((step) => {
step.querySelector(".icon, .spinner")?.remove();
step.setAttribute("data-variant", "pending");
});
let current = 0;
start(steps[current]);
const timer = setInterval(() => {
steps[current].removeAttribute("aria-busy");
steps[current].querySelector(".spinner").outerHTML = check;
current += 1;
if (steps[current]) return start(steps[current]);
clearInterval(timer);
play.disabled = false;
}, 2000);
});
});
</script>

A note, with Edit and Delete while it can still be changed

  1. Order placed on hold
  2. Emma Wilson

    Address looked wrong, so I emailed the customer to confirm it before we ship.

  3. Order placed
<ol class="timeline">
<li>
Order placed on hold
<time datetime="2025-03-23T08:15">March 23, 2025, 8:15 a.m.</time>
</li>
<li data-variant="note">
<article>
<h4>Emma Wilson</h4>
<time datetime="2025-03-23T08:10">March 23, 2025, 8:10 a.m.</time>
<p>Address looked wrong, so I emailed the customer to confirm it before we ship.</p>
<footer>
<button type="button" class="btn" data-variant="outline" data-size="sm">Edit</button>
<button type="button" class="btn" data-variant="destructive" data-size="sm">Delete</button>
</footer>
</article>
</li>
<li>
Order placed
<time datetime="2025-03-22T18:40">March 22, 2025, 6:40 p.m.</time>
</li>
</ol>

A form for adding a note

  1. Add a note
    Notes are only editable for 5 minutes after being saved.
  2. Confirmation email sent to customer.
  3. Fulfillment status changed from Unfulfilled to On Hold.
<ol class="timeline">
<li id="demo-timeline-note-open">
Add a note
<form onsubmit="event.preventDefault(); this.closest('li').hidden = true">
<textarea class="textarea" name="note" placeholder="Add order note..." aria-label="Add a note"></textarea>
<footer>
<button type="submit" class="btn" data-size="sm">Save</button>
<button type="button" class="btn" data-variant="outline" data-size="sm" onclick="this.closest('li').hidden = true">Cancel</button>
<small>Notes are only editable for 5 minutes after being saved.</small>
</footer>
</form>
</li>
<li>
Confirmation email sent to customer.
<time datetime="2026-09-03T00:36">Sept. 3, 2026, 12:36 a.m.</time>
</li>
<li>
Fulfillment status changed from Unfulfilled to On Hold.
<time datetime="2026-09-03T00:35">Sept. 3, 2026, 12:35 a.m.</time>
</li>
</ol>