Timeline

Vertical and horizontal timeline displays for chronological events, status tracking, and activity feeds. Perfect for order tracking, project history, and notifications.

Overview

Timeline patterns display chronological sequences of events with visual connectors. They help users understand the progression of activities, track status changes, and review historical data.

Key features:

  • Semantic <ol>/<li> structure for ordered events
  • Scoped CSS with @scope for clean namespacing
  • Vertical and horizontal layout options
  • Status indicators via data-status attributes
  • Integration with user-avatar, tool-tip, and layout-reel
  • Semantic <time> elements for dates
  • CSS custom properties for easy theming

Simple Vertical Timeline

A clean vertical timeline with dots connecting each event. Uses semantic <ol>/<li> markup and CSS pseudo-elements for the line and markers. Ideal for project history, milestones, or changelog displays.

Timeline with Status Icons

Each timeline entry displays a status icon instead of a simple dot. Uses data-status attributes for styling variants and title + data-tooltip on icons to show completion details on hover. Without JS, the native browser tooltip provides a fallback. Great for order tracking and process workflows.

Activity Feed

A compact feed-style timeline for notifications and activity logs. Uses the user-avatar component for avatars, action descriptions with links, and relative timestamps. Suitable for dashboards and notification centers.

Horizontal Timeline

A horizontal scrolling timeline using layout-reel for touch-friendly scroll-snap behavior. The <ol> uses display: contents so <li> items participate directly in the reel's flex layout. Ideal for project roadmaps and milestone tracking.

CSS Custom Properties

Timeline patterns use CSS custom properties for easy customization:

Property Default Description
--timeline-line-color var(--color-border) Color of the connecting line
--timeline-dot-color var(--color-interactive) Color of the dot markers
--timeline-dot-size 0.75rem Size of the dot markers
--timeline-icon-size 2rem Size of icon containers
--avatar-size 2rem Size of user avatars in activity feeds

Usage Notes

  • Semantic markup: Use <ol>/<li> for ordered timelines - screen readers announce item count and position
  • Scoped CSS: Use @scope with semantic element selectors (li, time, h3, p) instead of classes - cleaner HTML and better maintainability
  • Semantic time elements: Always use <time> with a datetime attribute for machine-readable dates
  • Status via data attributes: Use data-status instead of classes for state styling - cleaner separation of concerns
  • Tooltips: Add title + data-tooltip to status icons for hover context (progressive enhancement — works without JS)
  • User avatars: Use the user-avatar component for consistent avatar styling in activity feeds
  • Horizontal scroll: Use layout-reel with data-layout-scrollbar for horizontal timelines with visible scrollbar
  • Color semantics: Use consistent colors - --color-success for completed, --color-warning for pending, --color-error for issues

Related

Stats

Metric cards and data displays

Layout Reel

Horizontal scrolling container

User Avatar

Avatar component with fallbacks

tool-tip

Tooltip web component