Timeline
A vertical activity feed for displaying chronological events — deployments, audit logs, status updates, user activity. Each item has a colored dot indicator, optional icon, timestamp, and content area.
Basic Usage
-
Deployed v1.2.02 hours agoRelease notes linked below.
-
Tests passed5 hours agoAll 142 tests green.
-
Branch created1 day agofeature/new-dashboard
With Intent Colors
Use the intent prop on individual items to signal different event types:
-
Status: SuccessDeployment successfulJust now
-
Status: WarningBuild warning: deprecated API10 min ago
-
Status: ErrorPipeline failed1 hour agoExit code 1 on test step.
-
Commit pushed2 hours ago
With Icons
Pass a semantic icon alias to each item:
-
Status: SuccessDeployedJust now
-
Status: WarningWarning issued5 min ago
-
Status: ErrorBuild failed1 hour ago
Continuation Lines
Use before and after to show dashed fade-in / fade-out lines, indicating that the visible timeline is part of a larger history. The lines use a CSS mask-image gradient to fade gracefully.
-
Status: SuccessDeployed v1.2.02 hours agoRelease notes linked below.
-
Tests passed5 hours agoAll 142 tests green.
-
Branch created1 day agofeature/new-dashboard
before— dashed line that fades in from the top, indicating earlier events exist aboveafter— dashed line that fades out at the bottom, indicating later events exist below
Layout
Every timeline renders one layout: items on the left, each with a dot indicator and a vertical connector line running between them.
The variant styling hook
variant is passed straight through to a data-wk-timeline attribute on the <ol>. WireKit's
stylesheet reads that the attribute is present — that is what strips the trailing padding from
the final item — but it ships no rules that branch on its value, so a timeline renders
identically whatever you pass. The prop is a hook for your own stylesheet, not a set of layouts
WireKit implements. Do not reach for it expecting tighter or centered spacing to arrive on its
own.
It earns its keep when a project wants one timeline in the application styled differently from the rest, without threading a class through every call site:
-
Login09:15
-
Updated profile09:22
-
Logout09:30
The markup above renders at the standard spacing. Add the rule to your own app.css and the same
markup tightens, because the item content area carries a data-wk-timeline-item-content hook of
its own:
/* 1. Scope to the value you passed — the container writes it verbatim. */
[data-wk-timeline="compact"] [data-wk-timeline-item-content] {
/* 2. Half the stock 1.5rem gap. WireKit's own zeroing rule for the final
item is more specific, so the timeline still ends flush. */
padding-bottom: 0.75rem;
}
Timeline Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant |
string | 'default' |
Free-form marker written verbatim to the container's data-wk-timeline attribute, for your own CSS to target. WireKit ships no rules that branch on the value — see The variant styling hook |
before |
bool | false |
Show a dashed fade-in line above the first item (indicates earlier events) |
after |
bool | false |
Show a dashed fade-out line below the last item (indicates later events) |
scope |
string|null | null |
Scoped personalization key |
Timeline Item Props
| Prop | Type | Default | Description |
|---|---|---|---|
time |
string|null | null |
Timestamp text (e.g. '2 hours ago', '09:15') |
datetime |
string|null | null |
A machine-readable value for the same moment ('2026-09-09T21:00:00+02:00', '2026-09-09'). With one the row renders a real <time>; without one it renders a <span>, because a <time> whose text is a phrase like '2 hours ago' and which carries no datetime is invalid HTML and machine-readable to nothing |
icon |
string|null | null |
Semantic icon alias for the dot indicator |
variant |
string | 'default' |
Dot color variant: 'default' (accent), 'success', 'warning', 'danger' |
intent |
string|null | null |
Canonical name for the dot color, accepting the same values as variant. Falls back to variant when omitted, and wins over it when both are given. |
scope |
string|null | null |
Scoped personalization key |
Slots
| Slot | Purpose |
|---|---|
title |
Event headline (rendered in heading weight) |
| default | Event body/description text |
Accessibility
- Uses semantic
<ol>(ordered list) — screen readers announce "list of N items" - Each event is an
<li>— natural reading order matches chronological order - Dot indicators and connector lines are
aria-hidden="true"— decorative only - Timestamp uses
<time>element for machine-readable dates - All text content is accessible without relying on visual indicators
- An item with
variant/intentset tosuccess,warningordangeralso emits a translated screen-reader-only status word ("Status: Success", "Status: Warning", "Status: Error") ahead of its title, so the outcome the dot color signals is not carried by color alone (WCAG 1.4.1). Adefaultitem emits nothing — it signals no outcome, and a status word on every row would be noise - The dot color is reinforcement, not the message. Write the title so it reads correctly with the color removed ("Pipeline failed", not "Pipeline")
Keyboard Interaction
This component is purely presentational and does not respond to keyboard input.
Pitfalls
- Don't put more than 50 events in one timeline. Cognitive overload + DOM weight. Paginate or filter.
Design Tokens
| Element | Token |
|---|---|
| Font family | --font-wk-sans |
| Text color | --color-wk-text |
| Time text color | --color-wk-text-muted |
| Connector line | --color-wk-border |
| Default dot | --color-wk-accent |
| Success dot | --color-wk-success |
| Warning dot | --color-wk-warning |
| Danger dot | --color-wk-danger |
| Heading weight | --font-wk-heading-weight |
| Spacing gap | --padding-wk-x-md |
| Dot size | --size-wk-xs (fallback: 1.5rem) |
Customization
This component reads no config/ keys — every option is a prop. Style it through the design tokens above, or scope a variant with the scope prop.
An empty 'timeline' => [] block in the config is not an override point: pasting one changes nothing.
Usage & Conventions
Prop conventions — this component uses one or more of the shared semantic prop names (
intent/variant/tone/surface). See Prop naming conventions for the canonical vocabulary, alias matrix, and decision tree.
Looking for a horizontal timeline? Reach for Stepper — it lays milestones out along a horizontal (or vertical) axis with connectors and a current-step marker, which is exactly the horizontal-timeline pattern. Timeline is purpose-built for vertical chronological feeds.