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.
pnpm dlx shadcn@latest add @caliper/route-progressWhen 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
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.
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
API reference
RouteProgress
component
Also accepts the native props of its root element and a ref.
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.
Related
- Order trackerWhere an order is: finished stages ticked, the line filling to the current one with the van moving along it, and the next stage's time.
- StepperShows where someone is in a multi-step flow and lets them go back.
- Dotted mapA dotted world with places on it and routes between them. Routes draw in once, then a short light runs along each in its direction. Choosing a place keeps its routes lit and dims the rest.