Skip to content
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
  1. Head south on Jalan Medan Merdeka Barat450 m
  2. Keep right onto Jalan M.H. Thamrin2.1 km
  3. At the Bundaran HI roundabout, take the second exit300 m
  4. Continue onto Jalan Jenderal Sudirman3.2 km
  5. Turn left onto Jalan Asia Afrika650 m
  6. Arrive at Senayan, on the right0 m
  • steps is the list of steps. Each step has a turn, a text, and optional distance in meters and duration in seconds.
  • The turn picks the arrow: start, straight, slight-left, left, sharp-left, slight-right, right, sharp-right, u-turn, roundabout, or arrive. 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.
  • current marks the step that the traveler is on now, with a frame and aria-current. The steps before it are dimmer.
  • locale formats the units. Change the words with labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessRouteSteps } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
steps*BlessRouteStep[]—
currentnumber—the step that the traveler is on now
localestring"en"
labelsPartial<{ route: string; total: (distance: string, time: string) => string; }>—

Released under the MIT License. Character names and artwork belong to their owners.