Menu

Timeline

Activity feed + timeline. 3 statuses.

  1. Order placed

    Nusrat Jahan, Mirpur

    Mon 10:20 am

  2. Packing

    Wrapped in the gift box

    Mon 2:00 pm

  3. Out for delivery

Installation

$ npx uix-ui@latest add timeline

This copies the file into components/ui/timeline.tsx in your project. npx shadcn@latest add @uix/timeline works too.

Usage

timeline.tsx
import { Timeline, TimelineItem } from "@/components/ui/timeline";

<Timeline style={{ width: 320, maxWidth: "100%" }}>
  <TimelineItem status="done" title="Order placed" description="Nusrat Jahan, Mirpur" time="Mon 10:20 am" />
  <TimelineItem status="current" title="Packing" description="Wrapped in the gift box" time="Mon 2:00 pm" />
  <TimelineItem status="upcoming" title="Out for delivery" last />
</Timeline>

Props

PropTypeDefaultDescription
statusdone | current | upcoming"done"
titleReact.ReactNode–
descriptionReact.ReactNode–
timeReact.ReactNode–
lastbooleanfalseHides the line below the dot (set it on the final item).

Everything else is passed to the root element, so className, aria-* and event handlers work as usual.

Dependencies

Installed for you by the CLI.

  • class-variance-authority
  • clsx
  • tailwind-merge
  • lib/utils.ts
  • components/ui/icons.tsx
This file exports 2 parts: Timeline, TimelineItem. Use only the ones you need.
esc

↑↓ to navigate · ↵ to select · esc to close