Skip to content
caliper ui docs

Pro

Route progress

A winding route with the journey drawn on it. The way travelled is a solid line, the way ahead is dashed, and a marker with a heading moves along the curve, easing to each new position.

Pro
pnpm dlx shadcn@latest add @caliper/route-progress

Parcel tracking

Advance the parcel along its route.

Order 4821

Arrives about 120 min

  1. WarehouseLeft 9:05
  2. Sorting hubScanned 11:40
  3. Local depotOut for delivery
  4. DeliveredHanded over

Warehouse, 20 percent of the way

Installs components/ui/route-progress.tsxDepends on lucide-reactMotion honours reduced motion

When to use

Use it for

  • Delivery, ride and shipment tracking.
  • Multi-leg journeys where where it is now matters as much as the stage.

Skip it when

  • A real map; this is a diagram of stages, not geography.
  • More than six stops; the labels no longer fit a phone.

Decisions

Why it is built this way, so you know what to keep when you change your copy.

Behaviour

Follows the true curve
The marker's place and heading come from measuring the path itself, so it turns with the bends instead of cutting across them.
Eases to each update
A new progress value glides from the old one over 0.3 to 1.7 seconds depending on distance.

Usage

A list underneath
The stops are an ordered list with the current one marked, and its change is announced.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/route-progress

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source. It is built from RouteProgress and currentStop.

example.tsx
import { RouteProgress, currentStop } from "@/components/ui/route-progress"

The worked example comes with Pro

The 36-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

RouteProgress

component

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
stops *RouteStop[]—Places along the route, first to last. They are spaced evenly.
progress *number—How far along the whole route the journey is, from 0 to 1.
etastring—Shown beside the route, e.g. "Arrives 4:20 pm".
labelstring"Journey"Names the journey, e.g. "Order 4821".

currentStop

component

No props of its own; it accepts the native props of its root element.

Accessibility

It exposes status semantics, with aria-hidden and aria-current kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion

It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.

All Compare & browse examples