Timeline

A vertical list of events in order.

Timeline is new in v0.4. It renders TimelineItems down a connecting line, each with a title, a time and optional details.

Installation

bash
shellui add timeline

This also installs TimelineItem.

Usage

Basic

Mark the current event with Active.

  1. Order delivered

    Left at the front desk.
  2. Out for delivery

    The courier picked up the parcel.
  3. Order placed

<Timeline>
    <TimelineItem Title="Order delivered" Time="Today" Active="true">Left at the front desk.</TimelineItem>
    <TimelineItem Title="Out for delivery" Time="Yesterday">The courier picked up the parcel.</TimelineItem>
    <TimelineItem Title="Order placed" Time="3 days ago" />
</Timeline>

With icons

An Icon replaces the dot. When you use the Icon slot, put the details in <ChildContent>.

  1. Deployed to production

    Build 412 is live.
  2. Pull request merged

    Reviewed and approved by two people.
  3. Branch created

<Timeline>
    <TimelineItem Title="Deployed to production" Time="2 minutes ago" Active="true">
        <Icon>
            <svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
                <path stroke-linecap="round" stroke-linejoin="round" d="M20 6 9 17l-5-5" />
            </svg>
        </Icon>
        <ChildContent>Build 412 is live.</ChildContent>
    </TimelineItem>
    <TimelineItem Title="Pull request merged" Time="1 hour ago">
        <Icon>
            <svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
                <path stroke-linecap="round" stroke-linejoin="round" d="M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM18 9a9 9 0 0 1-9 9" />
            </svg>
        </Icon>
        <ChildContent>Reviewed and approved by two people.</ChildContent>
    </TimelineItem>
    <TimelineItem Title="Branch created" Time="Yesterday">
        <Icon>
            <svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
                <path stroke-linecap="round" stroke-linejoin="round" d="M12 5v14M5 12h14" />
            </svg>
        </Icon>
    </TimelineItem>
</Timeline>

API Reference

Timeline

Parameter Type Default Description
ChildContent RenderFragment? null The TimelineItems
Class string? null Additional CSS classes

TimelineItem

Parameter Type Default Description
Title string? null Event title
Time string? null When it happened, already formatted
Active bool false Highlights the marker
Icon RenderFragment? null Replaces the dot
ChildContent RenderFragment? null Details under the title
Class string? null Additional CSS classes

Accessibility

  • Renders an ordered list (<ol> / <li>), so screen readers announce the order and count
  • Time renders in a <time> element

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.