---
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 record's history read down a column, newest first, its events grouped by day, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `Timeline`.

## When to use

- A record's history read down a column, newest first, its events grouped by day.

## 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>/trail-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 { Timeline, TimelineDay, TimelineItem, timelineEventKinds, TimelineEventIcon, groupByDay } from '@/components/ui/goop/timeline';
import { ActivityItemMedia, ActivityItemContent, ActivityItemActor, ActivityItemName, ActivityItemSeparator } from '@/components/ui/goop/activity-item';
import { Avatar, AvatarFallback } from '@/components/ui/goop/avatar';

function ProjectHistory() {
  const today = new Date();
  const at = (hoursAgo: number) => new Date(today.getTime() - hoursAgo * 3_600_000);
  const teodora = { name: 'Teodora Valk', initials: 'TV' };
  const events = [
    { id: 'review', person: teodora, words: 'moved FW-121 to In review', at: at(1) },
    { id: 'created', person: teodora, words: 'created this project', at: at(150) },
  ];
  return (
    <Timeline aria-label="Project 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>
                <Avatar variant="solid" shape="circle" size="3xs" name={event.person.name}>
                  <AvatarFallback>{event.person.initials}</AvatarFallback>
                </Avatar>
              </ActivityItemMedia>
              <ActivityItemContent>
                <ActivityItemActor>
                  <ActivityItemName>{event.person.name}</ActivityItemName>
                </ActivityItemActor>{' '}
                {event.words}{' '}
                <span className="whitespace-nowrap">
                  <ActivityItemSeparator className="w-auto pe-1" />
                  <time dateTime={event.at.toISOString()}>
                    {event.at.toLocaleTimeString('en-GB', { timeStyle: 'short' })}
                  </time>
                </span>
              </ActivityItemContent>
            </TimelineItem>
          ))}
        </TimelineDay>
      ))}
    </Timeline>
  );
}
```

- Fits: record: body (related: many).
- Also known as: ActivityFeed, ActivityLog, History, AuditLog, Changelog.
- A short history in a side panel stays plain ActivityItems; steps of a flow are Steps; a conversation is a MessageList.
- width, padding, gap, background, 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, so the fill behind each mark matches: `panel` the page panel, `card` 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 heading ("Today", "12 Nov 2026"): a group's `label` from `groupByDay`; dateTime?: string — The day as an ISO date, on a `time` element: a group's `dateTime`; headingLevel?: 2 | 3 | 4 | 5 | 6 = 3 — The heading's level, one under the heading the timeline stands under; 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
- `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-event-icon, timeline-group, timeline-group-label, timeline-group-list

## Keyboard

- Tab: move through the links inside the lines in reading order: each line's person, name and time, newest day first
- Enter: on a link: follow it

## Accessibility

- The part itself answers the keys above.

## 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/trail/components/activity-item): One line of a record's history saying who changed what and when, for an activity feed.
- [Avatar](/themes/trail/components/avatar): A person's or a team's picture or initials, beside their name or on its own.
- [Chart container](/themes/trail/components/chart): The card a custom chart is drawn in, with its grid, axes, series markers, tooltip and legend.
- [Chart bar](/themes/trail/components/chart-bar): A bar chart of amounts by category or period, side by side or stacked.
