---
title: "Timeline"
description: "Shows events in order on one vertical line, such as an order history, an activity feed, or a changelog. Each event is done, current, upcoming, or an error."
url: https://gelatinui.com/components/timeline
markdown_url: https://gelatinui.com/components/timeline.md
access: free
install: "npx shadcn@latest add @gelatin-ui/timeline"
registry_item: https://gelatinui.com/r/timeline.json
version: "2026-11-08"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Timeline

> Shows events in order on one vertical line, such as an order history, an activity feed, or a changelog. Each event is done, current, upcoming, or an error.

Page: https://gelatinui.com/components/timeline

## When to use it

Best for: Events in order on one vertical line: order history, an activity feed, a changelog, or project steps.

- Use it when the order of events is part of the meaning.
- Use `status` on `TimelineItem` for `done`, `current`, `upcoming`, or `error`.
- Use `variant` on `TimelineMarker` for a dot, an icon, or an avatar.
- Use `size="sm"` for a tighter list.

## When not to use it

- For steps that a person works through, use a [Stepper](https://gelatinui.com/components/stepper.md).
- For facts with no order, use a [Data List](https://gelatinui.com/components/data-list.md).

## Notes for agents

- Use one `current` item per list. It sets `aria-current="step"`.
- `TimelineTime` is a `<time>`. Pass `dateTime`, also when the text is not a date ("Expected Oct 17").
- `TimelineTitle` is a `<div>`. For a changelog, set the level with `render={<h3 />}`.
- The `dot` variant takes no children. The `icon` variant holds a 16px icon.
- An avatar in the marker needs its own size: 32px in a `default` Timeline, 24px in a `sm` one.
- A `::before` or `::after` of your own on the marker breaks the line.
- Give a block under the text its own top margin (`mt-2`).
- Color is not enough: say the status in the title.

## Anatomy

```text
Timeline
├─ TimelineItem (0..n)
├─ TimelineMarker (0..n)
├─ TimelineContent (0..n)
├─ TimelineHeader (0..n)
├─ TimelineTitle (0..n)
├─ TimelineTime (0..n)
└─ TimelineDescription (0..n)
```

## API reference

### Timeline

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "sm"` | "default" |  |

### TimelineItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `status` | `"current" \| "done" \| "error" \| "upcoming"` | "done" | Where the event is in a process. `done` (default): it happened; an activity feed uses only this. `current`: the step in progress, with `aria-current="step"`. `upcoming`: not yet; a hollow mark, a dashed line into it, and a muted title. `error`: it failed; a destructive mark. Color is never the only signal: the title says the status in words. |

### TimelineMarker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"avatar" \| "dot" \| "icon"` | "dot" |  |
| `children` | `ReactNode` |  |  |

### TimelineContent

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TimelineHeader

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TimelineTitle

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### TimelineTime

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### TimelineDescription

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Timeline | `timeline` | `data-size`, `data-status`, `data-variant` | `--spacing`, `--timeline-content-offset`, `--timeline-dot-size`, `--timeline-gap`, `--timeline-mark-size`, `--timeline-mark-top`, `--timeline-media-size`, `--timeline-next-line` |  |
| TimelineItem | `timeline-item` | `data-size`, `data-status`, `data-variant` | `--spacing`, `--timeline-content-offset`, `--timeline-dot-size`, `--timeline-gap`, `--timeline-mark-size`, `--timeline-mark-top`, `--timeline-media-size`, `--timeline-next-line` |  |
| TimelineMarker | `timeline-marker` | `data-size`, `data-status`, `data-variant` | `--radius`, `--spacing`, `--timeline-content-offset`, `--timeline-dot-size`, `--timeline-gap`, `--timeline-mark-size`, `--timeline-mark-top`, `--timeline-media-size`, `--timeline-next-line` |  |
| TimelineContent | `timeline-content` | `data-size`, `data-status`, `data-variant` | `--spacing`, `--timeline-content-offset`, `--timeline-dot-size`, `--timeline-gap`, `--timeline-mark-size`, `--timeline-mark-top`, `--timeline-media-size`, `--timeline-next-line` |  |
| TimelineHeader | `timeline-header` |  |  |  |
| TimelineTitle | `timeline-title` |  |  |  |
| TimelineTime | `timeline-time` |  |  |  |
| TimelineDescription | `timeline-description` |  |  |  |

## Usage

Each `TimelineItem` holds a `TimelineMarker` and a `TimelineContent`. Pass `dateTime` on `TimelineTime`, also when the text is not a date.

```tsx title="order-history.tsx"
import {
  Timeline,
  TimelineContent,
  TimelineHeader,
  TimelineItem,
  TimelineMarker,
  TimelineTime,
  TimelineTitle,
} from "@/components/ui/timeline";

export function OrderHistory() {
  return (
    <Timeline aria-label="Order history">
      <TimelineItem>
        <TimelineMarker />
        <TimelineContent>
          <TimelineHeader>
            <TimelineTitle>Order placed</TimelineTitle>
            <TimelineTime dateTime="2026-10-18T09:12:00Z">Oct 18, 9:12</TimelineTime>
          </TimelineHeader>
        </TimelineContent>
      </TimelineItem>
    </Timeline>
  );
}
```

## Compose

Build it with:

- [Workspace](https://gelatinui.com/components/workspace.md): Holds the app shell: the sidebar and the page.
- [Frame](https://gelatinui.com/components/frame.md): Groups a row of numbers or a summary.
- [Data List](https://gelatinui.com/components/data-list.md): Shows label and value pairs.
- [Count Up](https://gelatinui.com/components/count-up.md): Shows a key number that changes.
- [Badge](https://gelatinui.com/components/badge.md): Shows a level or a status next to a number.

Rules:

- Depth from layers (`layered-neutrals`): Show depth with one step of the neutral tokens (page, card, muted) or one soft shadow, not with many borders or strong shadows.
- Color has a job (`color-has-a-job`): Use color only for a status, the brand action, or data; keep the rest neutral, and show a level with a small mark (a dot, a tinted badge) before a big fill.
- Real content (`real-content`): Fill the UI with content of the real product (real names, amounts, dates, and states), never lorem text or "Item 1".
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

Patterns: `gelatin://patterns/dashboard-overview`

## Add it

```bash
npx shadcn@latest add @gelatin-ui/timeline
```

It adds 8 registry items: 6 files, 1478 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Dot](https://gelatinui.com/components/dot.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Progress](https://gelatinui.com/components/progress.md)
- [Separator](https://gelatinui.com/components/separator.md)

## Accessibility

It is a list, and each event is a list item.

A `current` item sets `aria-current="step"`. Use one per list.

Color is not enough: say the status in the title, such as "Tests failed".
