Skip to main content

Timeline Pro

Events in order along a line: a project's history, a shipment's scans, an incident's updates. Each marker shows its step's status, done, in progress (with a gentle pulse), upcoming or failed, and the line fills up to the step in progress. Times sit beside the title or across the line. Long histories fold behind Show more, and dated ones can be headed by day. Each entry is read as one sentence with its status.

import { Timeline } from '@patine-ui/pro';
Loading…
<Timeline items={steps} current="out" line="dashed" style={{ width: 380 }} />

Try the props​

Props
variant
marker
line
timeFormat
orientation
density
design
<Timeline items={events} current="out" />

Example: an incident report​

A status page's incident: updates newest first, each with its time, the current state marked, and older updates folded behind Show more.

Loading…
<View style={{ width: '100%', maxWidth: 440, gap: 12 }}>
  <HStack gap="sm" align="center">
    <Text weight="semibold">Card payments failing</Text>
    <Badge variant="warning">Monitoring</Badge>
  </HStack>
  <Timeline items={UPDATES} current="monitoring" maxVisible={3} />
</View>

Status​

Set current to a step's key: steps before it are done, it's in progress, the rest are upcoming. Or give each item its own status: 'complete', 'current', 'upcoming', 'error' or 'warning'. color overrides a marker's color with a theme color name or any CSS color.

Markers and lines​

marker is 'dot', 'ring', 'icon' (the item's icon, or a check, cross or alert by status) or 'number'. markerSize sets the icon and number markers' diameter. line is 'solid', 'dashed' (only the stretch still to come is dashed) or 'none'.

Loading…
<View style={{ flexDirection: 'row', gap: 32, flexWrap: 'wrap' }}>
  <Timeline items={steps} current="c" marker="number" style={{ width: 260 }} />
  <Timeline items={steps} current="c" marker="ring" line="dashed" density="compact" style={{ width: 260 }} />
</View>

Variants​

'default' puts the time beside the title, 'opposite' on the other side of the line, 'alternate' puts entries on both sides by turns, and 'card' puts each entry in a card.

Loading…
<View style={{ gap: 32, width: 520 }}>
  <Timeline items={releases} variant="alternate" />
  <Timeline items={releases} variant="opposite" />
  <Timeline items={releases} variant="card" marker="dot" />
</View>

Days, relative times and Show more​

groupByDay heads each day's entries ("Today", "Yesterday", "Mon, Mar 3"). timeFormat reads dated times as 'time', 'date', 'datetime' or 'relative' ("2 hours ago"). maxVisible folds the rest behind "Show N more"; expanded and onExpandedChange control it. reverse puts the newest first.

Loading…
<Timeline items={incident} groupByDay timeFormat="relative" maxVisible={3} style={{ width: 400 }} />

Across​

orientation="horizontal" lays the steps across in a row that scrolls sideways.

Loading…
<Timeline items={steps} current="pay" orientation="horizontal" style={{ width: 600 }} />

Your own markers and content​

renderMarker and renderContent get { item, index, status, time, color, theme }; item content adds any node under the description.

Props​

PropTypeDefaultDescription
itemsTimelineItem[]—{ key, title, description?, time?, icon?, status?, color?, content?, disabled? }
currentstring—The step in progress: before it done, after it upcoming.
variant'default' | 'opposite' | 'alternate' | 'card''default'
orientation'vertical' | 'horizontal''vertical'
marker'dot' | 'ring' | 'icon' | 'number''icon' with icons, else 'dot'
markerSizenumberthe design's
line'solid' | 'dashed' | 'none''solid'
reversebooleanfalseNewest first.
groupByDaybooleanfalseDay headings.
timeFormat'time' | 'date' | 'datetime' | 'relative''datetime'
locale / hour12 / now
maxVisible / expanded / defaultExpanded / onExpandedChangeFold long histories.
onItemPress(item) => void—
renderMarker / renderContent(info) => ReactNode—
loading / error / onRetry / emptyTitle / emptyDescription / renderEmptyStates.
density / animate / labels / design / theme / accessibilityLabel / style