Route Stops
An ordered multi-order trip - pickups and drop-offs with done, current and failed states, cash per stop, a trip summary and a per-stop action slot.
Code
<RouteStops stops={[{ id: "p1", kind: "pickup", name: "Bakery" }, { id: "d1", kind: "dropoff", name: "Sara", cashMinor: 10000 }]} />Delivery · beta
Live examples and controls: Route Stops in the lab.
Install
npx shadcn@latest add https://docs.nasaqui.com/r/route-stops.jsonThe courier's to-do list for a trip. The first stop that is not done is the current one and gets the actions.
When to use
- A courier trip with several pickups and drop-offs.
When not to use
Import
import { RouteStops } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"Quick start
<RouteStops stops={[{ id: "p1", kind: "pickup", name: "Bakery" }, { id: "d1", kind: "dropoff", name: "Sara", cashMinor: 10000 }]} />Anatomy
RouteStops data-slot="route-stops"
├─ summary: stops, cash to collect
└─ ol > li data-slot="route-stop" data-kind data-status data-current
├─ marker, name, address, order ref, ETA, note
└─ actions (current stop, or all)API
| Prop | Type | Default | Description |
|---|---|---|---|
stops | RouteStop[] | required | id, kind (pickup/dropoff), name, nameAr, address, addressAr, status (pending/done/failed), orderRef, cashMinor, eta, note, noteAr. |
currency | string | "USD" ("SAR" in Arabic) | ISO currency. |
onSelectStop | (stop) => void | none | Makes stops clickable. |
renderActions | (stop, { current }) => ReactNode | none | Per-stop actions. |
actionsForAll | boolean | false | Show actions on every stop, not just the current one. |
hideSummary | boolean | false | Hide the trip summary. |
locale / labels | "en" | "ar" / partial strings | context | Language and overrides. |
Examples
Lab stories: interactive trip, read-only, all done, Arabic.
Accessibility
An ordered list; the current stop has aria-current="step". Selectable stops are buttons.
RTL & i18n
Logical layout, Arabic names and notes via nameAr, addressAr, noteAr.
Styling & tokens
Uses --status-success, --status-danger, --brand. Target [data-current], [data-kind], [data-status].
Do / Don't
- Do give each stop an
orderRefon multi-order trips. - Don't show actions on future stops.
Related
DispatchOffer, CashCollect, MapView.
Lab
https://docs.nasaqui.com/?path=/docs/components-delivery-route-stops--docs
Dispatch Offer
A courier-side job offer with pickup and drop-off, fee, cash to collect, distance, ETA and a ring that counts down to expiry, with accept and decline.
ApiKeys
API key management with a create form (name, scopes, expiry), a one-time secret reveal with copy, a masked list with scopes and last used, and confirmed rotate and revoke, driven by async callbacks.