Skip to content

Timeline

An ordered timeline for activity feeds, project milestones, and event history, with flexible orientation and item slots.

Usage

STimeline renders an ordered sequence of events. It is display-only; use Stepper when people need to navigate or advance through a workflow.

  1. 9:15 AM
    Request created
    A new access request was submitted.
  2. 10:30 AM
    Manager review
    The request was approved by Maya.
  3. 11:05 AM
    Access granted
    The team workspace is ready to use.
vue
<script setup lang="ts">
const items = [
  { id: 'created', date: '9:15 AM', title: 'Request created', description: 'A new request was submitted.' },
  { id: 'approved', date: '10:30 AM', title: 'Approved', color: 'success' },
]
</script>

<template>
  <STimeline :items="items" />
</template>

Each item can provide a stable id, a display date, an ISO datetime, a title, a description, an icon, a semantic color, and a custom slot name. Caller order is preserved. Dates are displayed as supplied so the component does not assume a locale or time zone.

Set icon to any registered icon name to replace the solid dot with a larger outlined marker. A per-item color changes that marker's accent:

  1. 9:15 AM
    Request submitted
  2. 10:30 AM
    Review completed
  3. 11:05 AM
    Access granted
vue-html
<STimeline :items="[
  { date: '9:15 AM', title: 'Request submitted', icon: 'hugeicons:file-01' },
  { date: '10:30 AM', title: 'Review completed', icon: 'hugeicons:checkmark-circle-01', color: 'success' },
]" />

Orientation and alignment

The default is a vertical feed aligned to the start. align accepts start, end, or alternate; the same choices place horizontal content below, above, or alternately around the marker line.

  1. May
    Plan
  2. June
    Build
  3. July
    Launch
vue-html
<STimeline :items="milestones" orientation="horizontal" align="alternate" />

Custom content

Use #marker, #date, #title, and #description to replace individual parts, or #content to build each event body. A #item slot replaces all default content for every event. An item's slot field can choose a named slot for just that event. Scoped slots receive { item, index }, including any custom fields supplied in the item data.

  1. Issue opened

    New issue

    Checkout returns an error when applying a discount code.

    Maya Putri

  2. Assigned to engineering

    In progress

    Arif picked up the issue and started investigating.

    Arif Rahman

  3. Fix merged

    Resolved

    The validation fix is merged and ready for release.

    Dina Sari

vue-html
<STimeline :items="activity" align="alternate">
  <template #marker="{ item }">
    <SAvatar :name="item.actor" :text="item.initials" size="sm" />
  </template>
  <template #content="{ item }">
    <strong>{{ item.title }}</strong>
    <SBadge :label="item.action" :color="item.color" variant="soft" />
  </template>
</STimeline>

The marker and connector remain decorative; put links and buttons in the content slots so they keep their native interaction and accessibility.

Styling

size accepts sm, md, or lg; color sets the default marker color and each item can override it. ui can override root, item, track, marker, icon, connector, content, date, title, and description. An item may also provide its own class and partial ui overrides. The theme can be configured globally under ui.timeline.

Theme source "timeline" not found

Props

PropTypeDefault
itemsTimelineItem[]required
orientation'vertical' | 'horizontal'vertical
align'start' | 'end' | 'alternate'start
size'sm' | 'md' | 'lg'md
colorColorRoleprimary
uiPartial<Record<TimelineThemeSlot, string | object>>-

TimelineItem supports id, date, datetime, title, description, icon, color, slot, class, per-item ui, and custom application data.

Slots

SlotPropsDescription
marker{ item, index }Replaces the marker content; defaults to the item's icon or a dot
connector{ item, index }Content inside the decorative connector between items
date{ item, index }Replaces the displayed date
title{ item, index }Replaces the title text
description{ item, index }Replaces the description text
content{ item, index }Replaces the whole default event body
item{ item, index }Replaces the whole default event body, including date/title/description
Named item slot{ item, index }An item's slot property can select a named slot for that item
Edit this page