Timeline

A React component in Beamline's Content & display category, in the free sample.

What happened, newest first and grouped by day: people with avatars, systems with toned icons, relative times with the exact time on hover, details in place.

Use it for

  • Account or record activity: who did what, when.

Not for

Anatomy

  • day heading
  • event (avatar or toned icon, actor + title; its time at the end of the first line when wide, on the fact line below 24rem; time and meta isolated from the page direction)
  • connector
  • Details toggle (24px target)
  • detail panel (opens in place)

States

  • collapsed details
  • open details
  • empty
  • loading (`loading`: a day of event rows drawn to the real rows' shape, filling maxHeight when it is set)
  • landed (the events fade in after loading)
  • new event (grows in at the top; the rest slide down)
  • wide (times as a column) / narrow (below 24rem: time joins the fact line)
  • pointed at or focused (the relative time gives way to the clock time in the same place)

Keyboard

  • Details is a button (aria-expanded)

Motion

Scrolls to the top when a newer event arrives; the new event grows in and the rest slide down (useFlip, read against the content so scrolling is not a move). Details open to their own height and fold back (.disclosure-panel), the chevron turns on tokens; the trigger answers hover at once. Events fade in when they land after loading. Reduced motion places at once. Pointed at or focused, an event's relative time crossfades to its clock time in place (arrive at once, leave over --pui-motion-out); the place is as wide as the longer of the two, so nothing moves. Narrow, where the time joins the fact line, the clock time stays in the time's title, so the dot follows the words closely; facts given as "a · b" wrap between themselves, never ending a line on a dot.

Props

PropTypeDefaultDescription
events{ id, at, actor, title, meta?, detail?, icon?, tone?, avatar? }[]—Events displayed by the component. Required.
now / timeZone / localenumber / string / string—now: The time "now" is measured from (pass it for stable demos and tests). Default the current time. timeZone: IANA time zone used to format dates and times. Defaults to the runtime time zone. locale: Locale used for number, date or text formatting. Defaults to the runtime locale.
maxHeight / scrollToNew / defaultExpanded / headingLevelmixed—maxHeight: Scroll inside this height. scrollToNew: Scroll to the top when a newer event arrives. Default true. defaultExpanded: Event ids whose details start open; defaults to an empty list. headingLevel: Heading level of the day headings. Default 3.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
classNamesTimelineClassNames—Classes for the named visual parts; no part overrides by default.
loadingbooleanfalseWhile the events load: a day of event rows drawn to the real rows' shape, filling `maxHeight` when it is set.
expanded / defaultExpanded / onExpandedChangestring[]—expanded: Controlled event ids with open details; omitted by default to keep expansion locally. defaultExpanded: Event ids whose details start open; defaults to an empty list. onExpandedChange: Reports the event ids with open details after a toggle; no callback by default.
nownumber—The time "now" is measured from (pass it for stable demos and tests). Default the current time.
labelstring—Visible label or accessible name for the control. Defaults to "Activity".
timeZonestring—IANA time zone used to format dates and times. Defaults to the runtime time zone.
localestring—Locale used for number, date or text formatting. Defaults to the runtime locale.
maxHeightMaxHeight<string | number>—Scroll inside this height.
scrollToNewboolean—Scroll to the top when a newer event arrives. Default true.
expandedstring[]—Controlled event ids with open details; omitted by default to keep expansion locally.
defaultExpandedstring[]—Event ids whose details start open; defaults to an empty list.
onExpandedChange((ids: string[]) => void)—Reports the event ids with open details after a toggle; no callback by default.
headingLevel2 | 3 | 4 | 5 | 6—Heading level of the day headings. Default 3.
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refRef<HTMLElement>—Receives the documented root element; no ref by default.
toolbarboolean—Show query controls in record mode. Set false when a parent screen supplies them.
manualboolean—Server owns ordering, filters, search and page slicing. Default false.
sortListSort—
defaultSortListSort—
onSortChange((sort: ListSort) => void)—
filtersListFilters—
defaultFiltersListFilters—
onFiltersChange((filters: ListFilters) => void)—
querystring—
defaultQuerystring—
onQueryChange((query: string) => void)—
selectedstring[]—Stable row IDs, retained across server pages.
defaultSelectedstring[]—
onSelectedChange((ids: string[]) => void)—
selectableboolean—
errorReactNode | Error—Errors retain the last completed rows. Error objects are rendered by their message.
onRetry(() => void | Promise<unknown>)—
emptyLabelstring—
allowSelectAllMatchingboolean—
onSelectAllMatching((scope: { rowCount: number; query: string; filters: ListFilters; }) => void)—
paginationboolean—Enable page controls explicitly. Page-related props also enable them, unless onEndReached is supplied.
pagenumber—One-based requested page. Default 1.
defaultPagenumber—
onPageChange((page: number) => void)—
pageSizenumber—Positive rows per page. Default 25.
defaultPageSizenumber—
onPageSizeChange((pageSize: number) => void)—
rowCountnumber | null—Total matching rows on the server. null means unknown. Local grids calculate it before slicing.
totalnumber | null—Deprecated: Use rowCount. Canonical rowCount wins, including null.
onEndReached(() => void | Promise<unknown>)—Append mode: fetch another batch. The app appends it to the supplied rows.
hasMoreboolean—Whether another batch exists; defaults to true with onEndReached. False stops requests.
loadingMoreboolean—An append request is pending; retain every loaded row.

Built from

Used in

Dependencies

lucide-react

Import

import { Timeline } from "@beamline/timeline";

Get it

Timeline is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Timeline is included in the free MIT sample. Get Beamline · Connect your agent

More in Content & display

  • Image compare: Two images in one frame with a divider: drag anywhere, or arrow keys on the handle; horizontal or vertical, with captions.
  • Revision compare: Two revisions of a drawing on one camera: side by side, they pan and zoom together (a crosshair in one pane marks the point under the pointer in the…
  • Live cursors: Who else is working on this, and where: over any shared surface, each person's pointer in the colour their name always gets, with a name flag, gliding…
  • Document viewer: A PDF or a paged document read and marked up in place: page thumbnails beside it, zoom to the width, the page or a percentage, pages by keyboard, a…
  • Video player: A video player on the native <video> element: title bar with an external link and close, centre play with ±10 s, scrub, time, volume, speed, captions…
  • Lightbox: A full-screen image viewer: a thumbnail grows into it and shrinks back, arrows and ←/→ step through the set, Esc or a downward drag closes it.
  • File diff: A change to one file as a unified diff: line numbers, tinted lines, only the changed words marked, long unchanged stretches folded; give rows or just…
  • QR Code: A scannable code set as gradient dots with rounded finder rings and an optional centre mark; a new value ripples out from the centre.
  • Data matrix: A DataMatrix (ECC 200, ISO/IEC 16022) any scanner reads: crisp square modules in SVG at any size, the smallest symbol that holds the value (10×10 to…
  • Slot text: Text and numbers that roll into their new value on reels, digit by digit from the right; other characters fade. Read as plain text by assistive tech.
  • Text reveal: A headline whose words rise into place once, the first time it scrolls into view; never repeats.
  • Text morph: A short label that becomes its next state letter by letter: shared letters glide into place, new ones arrive, old ones leave.
  • Code block: Code to read and copy: highlighted in the system's colours, numbered, marked lines, long files folded behind “Show all”.
  • Inbox list: Conversations waiting for a person, triaged in place: sender, subject and the first words, time, unread weight, star, labels and attachments, grouped by…
  • Comment thread: A discussion attached to something: replies, reactions, @mentions, editing and deleting your own, resolve that folds the thread.
  • Description list: The details of one record as label and value pairs: beside each other or stacked, in as many columns as the room holds; a copy button arrives on the row…
  • Text shimmer: Ongoing work said in words (“Thinking…”) with a calm band of light passing across them; stops when inactive.
  • Logo Carousel: A wall of logos shown a few at a time: every few seconds the slots turn left to right, each logo leaving upward as the next rises in.
  • Avatar group: A team in a small space: overlapping faces that name themselves on hover or focus, and “+N” naming the rest.
  • Avatar: A person or account in a small space: a photo, or initials on the hue their name always gets; presence dot; circle for people, square for companies.
  • Item: The generic list row: media, title, description, meta and trailing actions; becomes a link or button when interactive.
  • Marker: A labelled point in a stream: a status event with an icon between messages, or a label such as "Today" between two hairlines.
  • Credit: "Designed with Beamline" for a site's footer: the Beamline mark and a quiet line, or a small badge. With your partner code, each new customer's first…
  • Badge: A short status, category or count label: six tones, an icon or a status dot, two sizes.
  • Kbd: Keyboard keys as keycaps, for combinations and sequences (G then A); `mod` resolves to ⌘ or Ctrl per platform, symbols are spoken as words.

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.