Skip to main content
Copy for LLM

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

Simple timeline
  1. Deployed v1.2.0
    2 hours ago
    Release notes linked below.
  2. Tests passed
    5 hours ago
    All 142 tests green.
  3. Branch created
    1 day ago
    feature/new-dashboard

With Intent Colors

Use the intent prop on individual items to signal different event types:

Colored intents
  1. Status: Success
    Deployment successful
    Just now
  2. Status: Warning
    Build warning: deprecated API
    10 min ago
  3. Status: Error
    Pipeline failed
    1 hour ago
    Exit code 1 on test step.
  4. Commit pushed
    2 hours ago

With Icons

Pass a semantic icon alias to each item:

Timeline with icons
  1. Status: Success
    Deployed
    Just now
  2. Status: Warning
    Warning issued
    5 min ago
  3. Status: Error
    Build failed
    1 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.

Timeline with continuation lines
  1. Status: Success
    Deployed v1.2.0
    2 hours ago
    Release notes linked below.
  2. Tests passed
    5 hours ago
    All 142 tests green.
  3. Branch created
    1 day ago
    feature/new-dashboard
  • before — dashed line that fades in from the top, indicating earlier events exist above
  • after — dashed line that fades out at the bottom, indicating later events exist below

Layout

Every timeline renders one layout: each item has its dot indicator at the start of the line, on the left in a left-to-right page and on the right in a right-to-left one, with a vertical connector line running between the dots.

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:

Timeline carrying a variant hook
  1. Login
    09:15
  2. Updated profile
    09:22
  3. Logout
    09: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|DateTimeInterface|null null Timestamp text (e.g. '2 hours ago', '09:15'). A date object, a model's Carbon or PHP's own DateTimeImmutable, is written as the page's language writes a day with a time of day, and gives the row its datetime when none is set
datetime string|DateTimeInterface|int|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. A date object or a Unix timestamp is written with its offset, and a string such as '2026-09' as it stands; a string that names no moment is reported, and the row renders a <span>
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.
title string|null null The event's headline. The title slot takes the same place and wins when both are given — use it when the headline carries markup
scope string|null null Scoped personalization key

Slots

Slot Purpose
title Event headline (rendered in heading weight), when it carries markup. A plain headline can be the title prop
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/intent set to success, warning or danger also emits a translated screen-reader-only status word ("Status: Success", "Status: Warning", "Status: Error") ahead of its title, so a screen reader hears the outcome the dot color shows. A default item 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"): the status word reaches a screen reader only, and the title is what tells a reader who does not separate the colors (WCAG 1.4.1)

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.
  • Write each event as timeline.item, not as a bare <li>. A raw <li> renders in the list without the item's marker, line and spacing. php artisan wirekit:doctor:props reports it with its line and the item to write.

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-text
Success dot --color-wk-success-text
Warning dot --color-wk-warning-text
Danger dot --color-wk-danger-text
Icon or inner dot on a dot --color-wk-bg
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/wirekit.php 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.

Further Reading

Updated in WireKit v2.74.0 (2026-11-24)

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store