Prodular UI

Timeline

Pro

An activity feed with avatars or icons, actor, action, target and relative time, optional comments and attachments, grouped by day with sticky labels and a connector line.

npx prodular-ui add timeline

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

Account activity

Grouped by day inside a scrolling card. Day labels stick to the top while their group scrolls past.

Activity

Northwind Logistics

Today

  1. MO

    Maya Okafor commented on INV-2094

    Their AP team confirmed the PO number. Payment is scheduled for Friday, so let us hold the reminder.
  2. INV-2088 was paid, $18,420.00 by ACH

  3. TL

    Theo Lindqvist attached the renewal quote

    northwind-renewal-2027.pdf284 KB

Yesterday

  1. Ledgerline sent a payment reminder for INV-2094

  2. Priya Raman added Jonas Becker as billing contact

Oct 16

  1. Salesforce sync updated the plan to Scale, 240 seats

  2. DF

    Daniel Ferreira marked the account as Expansion opportunity

Deploy feed

Tinted icons for outcomes, a muted icon for neutral events.

  1. api-gateway deployed to production

    a41f9c2 · Rate limit per workspace

  2. billing-worker failed health checks

    3 of 6 pods exited with OOMKilled. Traffic stayed on the previous release.
  3. Hana Sato rolled back billing-worker

  4. Theo Lindqvist merged #1287 into main

Anatomy

<Timeline>  <TimelineGroup>    <TimelineGroupLabel>Today</TimelineGroupLabel>    <TimelineList>      <TimelineItem>        <TimelineMedia variant="avatar"><Avatar size="sm">...</Avatar></TimelineMedia>        <TimelineContent>          <TimelineHeader>            <TimelineTitle>              <TimelineActor>Maya Okafor</TimelineActor> commented on <TimelineTarget>INV-2094</TimelineTarget>            </TimelineTitle>            <TimelineTime dateTime={event.at} />          </TimelineHeader>          <TimelineBody>Payment is scheduled for Friday.</TimelineBody>        </TimelineContent>      </TimelineItem>    </TimelineList>  </TimelineGroup></Timeline>

Guidance

Use it when

  • The history of a record: who changed what and when. Accounts, invoices, tickets, deploys.
  • System and human events in one stream, with avatars for people and icons for systems.

Avoid

  • Comment threads people reply to. Use a chat or comments component.
  • Wrapping comments in tinted bubbles inside a card. TimelineBody uses a hairline.
  • Tinting every icon. Reserve success, warning and destructive for outcomes.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Write each title as actor, action, target: wrap the person or system in TimelineActor and the object in TimelineTarget, keep the verb plain.
  • Use TimelineMedia variant="avatar" with an Avatar size="sm" for people, variant="icon" for neutral system events, and success, warning, destructive or info only for outcomes.
  • Pass dateTime to TimelineTime. Pass a fixed now when rendering on the server so relative times match after hydration.
  • Group by calendar day with TimelineGroup and TimelineGroupLabel (Today, Yesterday, then dates). Set --timeline-surface to the background the timeline sits on, for example [--timeline-surface:var(--card)] inside a card, so sticky labels cover the content.
  • List newest first.

API

TimelineMedia

PropTypeDefaultDescription
variant"avatar" | "icon" | "success" | "warning" | "destructive" | "info" | "brand""icon"The circle to the left of each event.

TimelineTime

PropTypeDefaultDescription
dateTimeDate | string | numberWhen it happened. Shown relative to now unless children are passed.
nowDate | numberDate.now()Reference time for the relative label.

TimelineGroupLabel

PropTypeDefaultDescription
childrenReactNodeThe day. Sticky inside the nearest scroll container.

Timeline

PropTypeDefaultDescription
--timeline-surfaceCSS variablevar(--background)Background of the sticky day labels.

formatRelativeTime

PropTypeDefaultDescription
(date, now)functionThe formatter TimelineTime uses, exported for other places.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add timeline# or, with the registry in components.jsonnpx shadcn@latest add @prodular/timeline

Used in these screens