Skip to content
SENVENLI UI

Timeline

A record's history grouped by day, with icons, tones and recent events in relative time.
An order's history
import { Timeline } from "@senvenli/react/display";

Examples

Without times

Titles in the order given; a dot where an item has no icon.

Guidelines

When to use it

  • What happened to one record, and when.

Use something else when

  • The steps lie ahead and are a flow to complete. Stepper
  • Events have no time order that matters. Grid list

Accessibility

Built in

  • Day headings keep the outline; times show the exact value on hover and to screen readers.

You provide

  • The time zone the events belong to.

API reference

Timeline

itemsRequired
TimelineItem[]
order
"newest" | "oldest"Default "newest"

With timestamps: newest first (default) or oldest first. Without them the list keeps the order given.

timeZone
string

The time zone the events belong to ("Europe/Berlin"): times show in it, and server and browser then format the same text. Left out, the browser's own zone (the server's on the server, settled on the client). An unknown zone falls back to UTC with a warning.

now
Date

"Now" for relative times. Without it, times render absolute on the server and on the first client render, then read relative ("3 min. ago") after mount and stay current while any event is under an hour old.

groupByDay
booleanDefault false

Groups the events under a title per day, for a long activity feed. Off by default.

dayHeadingLevel
4 | 2 | 3 | 5 | 6Default 3

Heading level of the day titles with groupByDay.