Calm motion: animations on this site only fade, with no movement
Route steps
The turns of a route with a direction, the distance, and the time
Lists the directions from one place to another, next to a map with pins or alone. The steps come from your routing service.
Basic
6.7 km · 20 min
- Head south on Jalan Medan Merdeka Barat450 m
- Keep right onto Jalan M.H. Thamrin2.1 km
- At the Bundaran HI roundabout, take the second exit300 m
- Continue onto Jalan Jenderal Sudirman3.2 km
- Turn left onto Jalan Asia Afrika650 m
- Arrive at Senayan, on the right0 m
stepsis the list of steps. Each step has aturn, atext, and optionaldistancein meters anddurationin seconds.- The turn picks the arrow:
start,straight,slight-left,left,sharp-left,slight-right,right,sharp-right,u-turn,roundabout, orarrive. The text says the turn in words, so the arrow is only a help. - The top line gives the total distance and time.
- Distances under 1 km show in meters, rounded to 10 m. Longer distances show in kilometers.
currentmarks the step that the traveler is on now, with a frame andaria-current. The steps before it are dimmer.localeformats the units. Change the words withlabelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessRouteSteps } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
steps* | BlessRouteStep[] | — | |
current | number | — | the step that the traveler is on now |
locale | string | "en" | |
labels | Partial<{ route: string; total: (distance: string, time: string) => string; }> | — |