Docs
Timeline

Timeline

Timeline displays a list of events in chronological order.

  1. Eat

    Because you need strength

  2. Code

    Because it's awesome!

  3. Sleep

    Because you need rest

  4. Repeat

    Because this is the life you love!

Installation

npx shadcn@latest add https://ui-x.junwen-k.dev/r/timeline.json

Usage

import {
  Timeline,
  TimelineConnector,
  TimelineContent,
  TimelineDescription,
  TimelineDot,
  TimelineItem,
  TimelineSeparator,
  TimelineTitle,
} from "@/components/ui/timeline"
<Timeline>
  <TimelineItem>
    <TimelineSeparator>
      <TimelineDot />
      <TimelineConnector />
    </TimelineSeparator>
    <TimelineContent>
      <TimelineTitle>Eat</TimelineTitle>
      <TimelineDescription>Because you need strength</TimelineDescription>
    </TimelineContent>
  </TimelineItem>
  <TimelineItem>
    <TimelineSeparator>
      <TimelineDot />
      <TimelineConnector />
    </TimelineSeparator>
    <TimelineContent>
      <TimelineTitle>Code</TimelineTitle>
      <TimelineDescription>Because it's awesome!</TimelineDescription>
    </TimelineContent>
  </TimelineItem>
  <TimelineItem>
    <TimelineSeparator>
      <TimelineDot />
      <TimelineConnector />
    </TimelineSeparator>
    <TimelineContent>
      <TimelineTitle>Sleep</TimelineTitle>
      <TimelineDescription>Because you need rest</TimelineDescription>
    </TimelineContent>
  </TimelineItem>
  <TimelineItem>
    <TimelineSeparator>
      <TimelineDot />
    </TimelineSeparator>
    <TimelineContent>
      <TimelineTitle>Repeat</TimelineTitle>
      <TimelineDescription>
        Because this is the life you love!
      </TimelineDescription>
    </TimelineContent>
  </TimelineItem>
</Timeline>

Examples

Default

  1. Eat

    Because you need strength

  2. Code

    Because it's awesome!

  3. Sleep

    Because you need rest

  4. Repeat

    Because this is the life you love!

Alternate

  1. Eat

    Because you need strength

  2. Code

    Because it's awesome!

  3. Sleep

    Because you need rest

  4. Repeat

    Because this is the life you love!

With Icon

  1. Eat

    Because you need strength

  2. Code

    Because it's awesome!

  3. Sleep

    Because you need rest

  4. Repeat

    Because this is the life you love!

Horizontal

  1. Ordered

    9.15 AM, January 1, 2024

  2. Shipped

    12:20 PM, January 4, 2024

  3. Out for Delivery

    07:00 AM, January 8, 2024