---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Timeline

A history read down a column, newest first, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `Timeline`.

## When to use

- A history read down a column, newest first.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Timeline on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-timeline.json --yes
```

```text
Add the Goop Timeline to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { timelineEventKinds } from '@/components/ui/goop/timeline';

import { ActivityItemAside, ActivityItemContent, ActivityItemMedia } from '@/components/ui/goop/activity-item';
import {
  groupByDay,
  Timeline,
  TimelineDay,
  TimelineEventIcon,
  TimelineItem,
  type TimelineEventKind,
} from '@/components/ui/goop/timeline';

function SurveyHistory() {
  const today = new Date();
  const at = (hoursAgo: number) => new Date(today.getTime() - hoursAgo * 3_600_000);
  const events: { id: string; kind: TimelineEventKind; words: string; at: Date }[] = [
    { id: 'due', kind: 'due', words: 'The soil report is due Friday', at: at(1) },
    { id: 'lead', kind: 'assigned', words: 'Bilal Rashed leads the north field survey', at: at(30) },
    { id: 'created', kind: 'created', words: 'The north field survey was created', at: at(80) },
  ];
  return (
    <Timeline aria-label="Survey history">
      {groupByDay(events, { date: (event) => event.at, today }).map((day) => (
        <TimelineDay key={day.key} label={day.label} dateTime={day.dateTime}>
          {day.items.map((event) => (
            <TimelineItem key={event.id}>
              <ActivityItemMedia>
                <TimelineEventIcon kind={event.kind} />
              </ActivityItemMedia>
              <ActivityItemContent>{event.words}</ActivityItemContent>
              <ActivityItemAside>
                <time dateTime={event.at.toISOString()}>
                  {event.at.toLocaleTimeString('en-GB', { timeStyle: 'short' })}
                </time>
              </ActivityItemAside>
            </TimelineItem>
          ))}
        </TimelineDay>
      ))}
    </Timeline>
  );
}
```

- Fits: record (its recipe); record: body (related: many).
- Also known as: ActivityFeed, ActivityLog, History, AuditLog, Changelog.
- A short history under a heading of its own is one TimelineDay with no `label`. Steps of a flow are not a timeline; a conversation is a list of messages.
- width, padding, gap, text: add no class for these.

## API reference

### Options

- `aria-label: string` — The region's name, read before its days ("Project history").
- `surface?: 'panel' | 'card' = 'panel'` — The surface it sits on: `panel` (the default) the page, `card` inside a Card.

- Types: GroupByDayOptions = { date: (event: T) => Date; today?: Date; locale?: string; todayLabel?: string; yesterdayLabel?: string }

### Parts

- `TimelineDay` — One day of a Timeline; label?: ReactNode — The day's words, its heading ("Today", "Yesterday", "12 Nov 2026"): a group's `label` from `groupByDay`; dateTime?: string — The day as an ISO date (`2026-11-18`), put on a `time` element round the heading's words: a group's `dateTime`; headingLevel?: 2 | 3 | 4 | 5 | 6 = 3 — The heading's level, one under the heading the timeline stands under (default 3); children?: ReactNode — The day's lines, newest first: `TimelineItem`s
- `TimelineItem` — One line of a day
- `TimelineEventIcon` — A line's mark for its kind of event, in an ActivityItemMedia; kind: 'created' | 'status' | 'assigned' | 'commented' | 'labelled' | 'due' | 'mentioned' | 'attached' | 'other' — What happened; className?: string — Classes for the icon, after its own (its icon-grey ink and its 14 px box)
- `timelineEventKinds` — Every kind of event, for a filter of the kinds
- `groupByDay` — Dated events grouped into days for a Timeline

- data-slot values (to select a part by): timeline, timeline-group, timeline-group-label, timeline-group-list, timeline-icon

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Activity item](/themes/meadow/components/activity-item): One line of a record's history saying what changed and when, for an activity feed.
- [Chart container](/themes/meadow/components/chart): The card a custom chart is drawn in.
- [Chart bar](/themes/meadow/components/chart-bar): A bar chart of amounts by category or period, side by side or stacked.
- [Chart line](/themes/meadow/components/chart-line): A line or area chart of up to five levels over time, read on hover, press or keyboard.
