Timeline
A vertical activity feed: an ordered list drawn as a connected rail of dots.
Live demo
Timeline turns a semantic ordered list into a vertical activity feed. It wraps an <ol> of <li> events and decorates them: each item grows a themed dot on a connector rail that runs from one event to the next and stops at the last.
It renders no markup of its own beyond the classes it adds, so the list stays the source of truth for order and content, and screen readers hear a plain ordered list. Inside an item, a <strong> reads as the event title, a <time> as its timestamp, and a <p> as the body; the same styling is available through xtyle-timeline__title / __meta / __body classes if the markup can't use those elements. Being standalone (like Table), it needs no runtime to render, only the derived token register the rail and dots draw from.
When to use
How this component composes with the rest of the set.
Anatomy
The named parts that make up the component, with their selectors.
list
The decorated ordered list; carries no bullets and no default spacing.
item
One event. Its marker dot and the connector rail below it are drawn as pseudo-elements.
title
The event title: a <strong> (or .xtyle-timeline__title).
meta
The timestamp or secondary line: a <time> (or .xtyle-timeline__meta).
body
The event body copy: a <p> (or .xtyle-timeline__body).
Tokens & coverage
What the component consumes, checked live against what the algorithm produces.
Live coverage check against the xtyle-default register
(derive(xtyleDefault, { anchors }) →
coverComponent(manifest, register)). Every token this component
consumes must be a key the algorithm produces.
--accent
--bg-0
--border-thick
--border-thin
--fg-0
--fg-1
--fg-2
--font-sans
--leading-normal
--leading-tight
--line
--radius-full
--space-1
--space-4
--space-5
--text-sm
--text-xs
--weight-semibold
Slots
The ordered list. Provide an <ol> (or <ul>) whose <li> children are the events.
Accessibility
Code
Activity feed
An ordered list of events; each item takes a dot on the connector rail.
<xtyle-timeline>
<ol>
<li>
<strong>Deployed v0.6.0</strong>
<time>2 hours ago</time>
<p>The accessibility pass and the new gallery mockup went live.</p>
</li>
<li>
<strong>Merged the release branch</strong>
<time>yesterday</time>
</li>
<li>
<strong>Opened the milestone</strong>
<time>last week</time>
</li>
</ol>
</xtyle-timeline>
<script lang="ts">
import { Timeline } from "@xtyle/svelte";
</script>
<Timeline>
<ol>
<li><strong>Deployed v0.6.0</strong><time>2 hours ago</time></li>
<li><strong>Merged the release branch</strong><time>yesterday</time></li>
</ol>
</Timeline>
---
import Timeline from "@xtyle/astro/Timeline.astro";
---
<Timeline>
<ol>
<li><strong>Deployed v0.6.0</strong><time>2 hours ago</time></li>
<li><strong>Merged the release branch</strong><time>yesterday</time></li>
</ol>
</Timeline>