Timeline

A vertical timeline: the connector draws down on scroll, nodes pop in, the current step pulses. Layout.

Open playground
  1. Order placed9:02

    We received your order.

  2. Packed11:40

    Wrapped and labelled.

  3. Out for deliveryNow

    Arriving this afternoon.

  4. Delivered

    Leave it with a neighbour if you are out.

About

Timeline is a React component in the Layout category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Timeline } from "@ashutoshswamy/smoui" and set items, current.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Timeline } from "@ashutoshswamy/smoui";

<Timeline current={2} items={[{ title: "Order placed", time: "9:02" }, { title: "Packed" }, { title: "Out for delivery" }]} />

Props 2

items

Steps.

{ title: string; time?: string; description?: string; icon?: ReactNode }[]
current

Index in progress. Earlier steps are filled; defaults to all done.

number