DocsComponentsTemplatesThemesGitHub

Timeline

Vertical list of events or steps with status dots.

Code

import * as React from 'react';
import { Timeline } from '@fruit-labs/design';

export default function Demo() {
  return (
    <div
      style={{
        maxWidth: 420,
      }}
    >
      <Timeline
        items={[
          {
            title: 'Order placed',
            time: '10:02',
            status: 'done',
          },
          {
            title: 'Payment confirmed',
            time: '10:03',
            status: 'done',
          },
          {
            title: 'Packing',
            description: 'Usually under an hour',
            status: 'running',
          },
          {
            title: 'Shipped',
            status: 'pending',
          },
        ]}
      />
    </div>
  );
}

Install

From npm:

npm install @fruit-labs/design

import { Timeline } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/timeline.json

Guidelines

  • Status: done, running, pending, error.

Props

PropTypeRequired
itemsArray<{ title: React.ReactNode; description?: React.ReactNode; time?: string; status?: 'done' | 'running' | 'pending' | 'error' }>Yes
classNamestringNo

Edit this example on GitHub