---
title: Timeline
description: Display events with shared fields or configure each event.
---

Use `timeline(data)` for events with the same fields. Use
`timeline(data, callback)` for events that need different fields or controls.
The data order is the display order. Sort the records in the resolver.

## Record timeline

<BacklitExample path="timeline/record" view="activity" />

`setFields` accepts `marker`, `time`, `title`, `description`, `meta`, and `body`.
`time` and `title` are required. `marker`, `time`, and `body` accept one field
each. `meta` accepts at most four fields. `title` and `description` accept one
field or an array. Calling `setFields` replaces all positions.

Use `onRowClick` for a link, `setRowActions` for controls, and `onDefect` for
conversion failures. `setDensity('compact')` omits description and body.
Record timelines support `setPaginator` and `setSorter` with bindings from one
scope. The resolver applies their values to the query.

## Item timeline

<BacklitExample path="timeline/items" view="activity" />

The callback receives a fresh `TimelineItemBuilder` and the event record.
Use `setFields`, `onClick`, and `setActions` for that event. The same position
limits apply. The item timeline supports `setDensity`, `onDefect`, and
`setPaginator`. It has no shared sorter. See [Search state](/reference/state).
