Data display

Timeline

A vertical list of events in order, each with a marker on a line that joins them: an order's history, an activity feed, the steps a request went through. Renders an <ol>.

  1. Order placed

  2. Payment approved

    Pix

  3. Shipped

Blade

Three events from top to bottom. The first has a check in a light green circle, the others a small dot, gray and blue. Each shows its title, the time as "2 days ago" (the full date in its tooltip) and the description in muted text, and a thin line joins the markers down to the last one.

From a collection #

Items written by hand; the slot of each goes under its texts, here the name of who did it.

  1. Created the project

    Ana Souza

  2. Invited Bruno Reis

    Ana Souza

  3. Archived old tasks

Blade

Icon slot #

An icon slot takes any content in place of the icon in the marker.

  1. Comment added

    "Looks good, approved."

  2. Milestone reached

Blade

Sizes #

size sets the text, the markers and the spacing.

  1. Created

  2. Updated

  1. Created

  2. Updated

Blade

Customization #

item: reaches each item from items, and inside an item marker:, title:, time: and description: each part.

  1. Deployed

  2. Built

Blade

Reference

tk:timeline
└── tk:timeline.item ...

tk:timeline

Prop Type Default Description
items array | Collection null The events, each an array of tk:timeline.item props, or a string used as its title.
size string md xs, sm, md, lg, xl, 2xl or 3xl. Sets the text, the markers and the spacing; inherited by the items.

Slots

Slot Description
default tk:timeline.item elements, before those from items.

Prefixes

Prefix Goes to
item: Each item from items.

tk:timeline.item

Prop Type Default Description
title string | slot null The title, translated.
description string | slot null Muted text under the title and time, translated.
time string | DateTimeInterface | int null When it happened, shown as a relative time with the full date in a tooltip (Time).
icon string | slot null An icon in a round marker. Without one, the marker is a small dot.
color string gray A color name for the marker (green, red, blue...).

Slots

Slot Description
default Content under the texts.

Prefixes

Prefix Goes to
marker: The dot or the icon circle.
title: The title.
time: The line holding the time.
description: The description.

Customization

Classes and attributes on tk:timeline go to the <ol>, and on tk:timeline.item to its <li>. The parts take prefixes (listed in the Reference above).

blade

Accessibility

An ordered list, so screen readers announce the number of events and read them in order. The markers and the line are hidden from them; the time is a <time> element with its machine-readable date.

Behavior notes

  • The line under the last item is left out, and so is the space after it.
  • The items from items have a wire:key from their position.