Skip to content

ExpressiveCSS

Browse documentation

Timeline

Events in order, each with a time, a title and details, joined by a line.

View as Markdown

An <ol class="timeline"> lists events in order. Each <li> is an event: a <time>, a heading and supporting text. A dot marks each event and a line joins it to the next.

The page picks the order, newest or oldest first. Give every <time> a datetime, so "Yesterday" still has a date behind it.

  1. Order placed

    Two items, paid by card.

  2. Shipped

    Tracking number sent by email.

  3. Arrives

<ol class="timeline">
  <li>
    <time datetime="2026-10-06T09:12">9:12 AM</time>
    <h3>Order placed</h3>
    <p>Two items, paid by card.</p>
  </li>
  <li>
    <time datetime="2026-10-06T11:40">11:40 AM</time>
    <h3>Shipped</h3>
    <p>Tracking number sent by email.</p>
  </li>
</ol>

Leading icon

For an activity feed that mixes kinds of event, put a leading icon first in the event. It replaces the dot with a tonal circle. Hide the icon from assistive technology, since the heading says what happened.

  1. Ada commented

    Looks good to me.

  2. Grace pushed 3 commits

<li>
  <span class="material-symbols" aria-hidden="true">chat</span>
  <time datetime="2026-10-06">Today</time>
  <h3>Ada commented</h3>
  <p>Looks good to me.</p>
</li>

Tokens

Override these on the .timeline.

Token Default
--md-comp-timeline-marker-color--md-sys-color-primary
--md-comp-timeline-connector-color--md-sys-color-outline-variant
--md-comp-timeline-gap24px

No matching pages

  • Source color

    The seed every generated ramp derives from. Pick one and browse the docs — the whole theme follows. Error does not: it is a fixed hue.

    Default source: Mist Iris.

    ExpressiveCSS presets: Lagoon, Harbor, Breeze, Cobalt, Iris.

    Bold

    Soft

    Mist

    Glow