npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-timeline.json --yesTimeline
ProA record's history read down a column, newest first, its events grouped by day, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- TimelineDayOne day of a Timeline
- TimelineItemOne line of a day
- TimelineEventIconA line's mark for its kind of event, in an ActivityItemMedia
- timelineEventKindsEvery kind of event, for a filter of the kinds
- groupByDayDated events grouped into days for a Timeline
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>
);
}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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-timeline.json --yesAdd the Goop Timeline to this project. The install steps are at https://goop.so/docs/install.mdUsage
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
| Option | Type | What it does |
|---|---|---|
| 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 }
| Part | What it is |
|---|---|
| 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: TimelineItems |
| 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
| Key | What it does |
|---|---|
| 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.