Skip to main content
Clever Ops

Service History Timeline

A React service logbook timeline for workshops and dealers, dated entries with mono odometer stamps, itemised work lines, honest totals, and a next-due marker in Tailwind tokens.

Preview & code

Loading Service History Timeline preview

Installation

pnpm dlx shadcn@latest add @cleverui/service-history-timeline

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { ServiceHistoryTimeline } from '@/components/blocks/service-history-timeline'
Exampletsx
'use client'

import { ServiceHistoryTimeline } from '@/components/blocks/service-history-timeline'

export default function ServiceHistoryTimelineDemo() {
  return (
    <div className="mx-auto max-w-2xl px-4 py-10 sm:px-6 sm:py-14">
      <ServiceHistoryTimeline
        heading="Service history"
        vehicle="2019 Ford Ranger XLT 3.2L"
        rego="1GX 8TZ"
        entries={[
          {
            date: '14 Mar 2025',
            odometer: '45,000 km',
            title: 'Logbook service',
            workshop: 'Beaufort Street Motors',
            items: [
              'Engine oil & filter',
              'Brake fluid flush',
              'Cabin pollen filter',
            ],
            amount: '$412',
            verified: true,
          },
          {
            date: '02 Sep 2024',
            odometer: '37,200 km',
            title: 'Brake & suspension check',
            workshop: 'Beaufort Street Motors',
            items: ['Front pads & rotors', 'Wheel alignment'],
            amount: '$890',
            verified: true,
          },
          {
            date: '18 Feb 2024',
            odometer: '30,050 km',
            title: 'Logbook service',
            workshop: 'Midland Ford Service',
            items: ['Engine oil & filter', 'Fuel filter', 'Air filter'],
            amount: '$385',
            verified: true,
          },
          {
            date: '11 Aug 2023',
            odometer: '22,800 km',
            title: 'Tyre replacement',
            workshop: 'Beaufort Street Motors',
            items: ['4× All-terrain 265/65R17', 'Balance & rotate'],
            amount: '$1,240',
          },
        ]}
        nextDue="Next due 60,000 km or Nov 2025"
      />
    </div>
  )
}

API reference

ServiceHistoryTimeline accepts the following props.

PropTypeDefaultDescription
headingstring'Service history'
vehicle*stringthe vehicle line under the heading, e.g. '2019 Ford Ranger XLT 3.2L'
regostringregistration plate as a mono chip, e.g. '1GX 8TZ'
entries*ServiceHistoryEntry[]newest first; all dates, odometers and amounts arrive preformatted
nextDuestringPREFORMATTED closing marker, the timeline's one accent moment
verifiedLabelstring'Verified entry'sr-only expansion on the stamp glyph

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface ServiceHistoryEntry {
  /** PREFORMATTED, e.g. '14 Mar 2025' */
  date: string
  /** PREFORMATTED, e.g. '45,000 km' */
  odometer: string
  title: string
  workshop?: string
  /** itemised work lines, e.g. ['Engine oil & filter', 'Brake fluid flush'] */
  items?: string[]
  /** PREFORMATTED, e.g. '$412' */
  amount?: string
  /** prints a neutral stamp glyph */
  verified?: boolean
}

Frequently asked questions

How do I install the Service History Timeline component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/service-history-timeline`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Service History Timeline require?

Service History Timeline uses motion and lucide-react on top of React and Tailwind CSS. You don't need to install them manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Service History Timeline to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services