dentil

Object Timeline

ObjectTimeline renders a vertical record of events. Each item has an icon and a title, and can add a description, a date and an onClick that turns the title into a button. Click the receipt.

@dentil/object-timeline
On this page
  1. Payment created from invoice INV-1042
    7 Nov 2026, 09:14
  2. Delivered
    7 Nov 2026, 09:15
  3. Payment succeeded
    7 Nov 2026, 09:16
  4. £25.00 refunded to the customer
    Requested by the customer
    7 Nov 2026, 11:02
Result: —

Installation

pnpm dlx shadcn@latest add @dentil/object-timeline
npx shadcn@latest add @dentil/object-timeline
yarn dlx shadcn@latest add @dentil/object-timeline
bunx --bun shadcn@latest add @dentil/object-timeline

Files land in components/dentil/object-timeline/. It has no stock shadcn dependencies. Pass any icon component that accepts className and size, such as one from lucide-react.

Usage

import { CreditCard, Mail } from 'lucide-react';

import { ObjectTimeline } from '@/components/dentil/object-timeline/object-timeline';

<ObjectTimeline
  items={[
    {
      id: 'created',
      icon: CreditCard,
      title: 'Payment created from an invoice',
      date: '7 Nov 2026, 09:14',
    },
    {
      id: 'sent',
      icon: Mail,
      iconClassName: 'text-primary',
      title: 'Receipt sent to ada@example.com',
      description: 'Delivered',
      date: '7 Nov 2026, 09:15',
      onClick: () => openReceipt(),
    },
  ]}
/>

Items without onClick stay plain text. The title is the button label when you pass one, so keep that title as text rather than nesting another link inside it.

API reference

ObjectTimeline

PropTypeDefaultDescription
itemsObjectTimelineItem[]—Events, in the order they render. The first item is at the top.
classNamestring—Merged onto the list.
…propsComponentProps<'ol'>—Other props (aria-label, id…) are passed to the list.

ObjectTimelineItem

PropTypeDefaultDescription
idnumber | string—Stable identity for the row.
dateReactNode—Secondary line under the description. Omit it when the event has no time.
titleReactNode—The event. With onClick, this becomes the button label.
descriptionReactNode—Muted line between the title and the date.
iconComponentType<{ className?: string; size?: number }>—Drawn at 14px on the rail. Lucide icons match this type.
iconClassNamestring—Colour and other classes for the icon. Defaults to text-muted-foreground.
onClick() => void—When set, the title is a button. Omit it for a record that does nothing.