Nasaq

Delivery Tracker

A customer-facing order tracker - five delivery steps with times, an ETA, the courier with call and message actions, a map slot, and cancelled or failed outcomes.

PreviewOpen ↗

Code

<DeliveryTracker orderNumber="1042" status="on-the-way" etaSeconds={540} courier={{ name: "Omar", nameAr: "عمر", phone: "+970591234567" }} />

Delivery · beta

Live examples and controls: Delivery Tracker in the lab.

Install

npx shadcn@latest add https://docs.nasaqui.com/r/delivery-tracker.json

Shows where an order is: placed, assigned, picked up, on the way, delivered. It adds an ETA, the courier, and any cancelled or failed reason. Pass a MapView in the map slot for live location.

When to use

  • A customer tracking page or link.
  • An order detail panel in an ops console.

When not to use

Import

import { DeliveryTracker } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"

Quick start

<DeliveryTracker orderNumber="1042" status="on-the-way" etaSeconds={540} courier={{ name: "Omar", nameAr: "عمر", phone: "+970591234567" }} />

Anatomy

DeliveryTracker  data-slot="delivery-tracker"  data-status
├─ header: order number, ETA
├─ map slot
├─ courier row: call, message
├─ steps list  data-slot="delivery-steps"
└─ outcome note (cancelled / failed)

API

PropTypeDefaultDescription
statusDeliveryOrderStatusrequiredplaced, assigned, picked-up, on-the-way, delivered, cancelled, failed.
reachedBeforeDeliveryStepnoneFor cancelled or failed: the last step reached.
timesDeliveryTrackerTimesnoneTime per step.
orderNumberstringnoneShown in the header.
etaSeconds / etaAtnumber / datenoneTime left, or the arrival moment.
courierDeliveryCouriernonename, nameAr, avatarSrc, vehicle, phone.
onCall / onMessage() => voidnoneActions; a phone renders a tel: link.
reason / reasonArstringnoneWhy it was cancelled or failed.
mapReactNodenoneMap slot.
locale / labels"en" | "ar" / partial stringscontextLanguage and overrides.

Examples

Lab stories cover each status, a live map and Arabic.

Accessibility

The steps are an ordered list; the current step has aria-current="step". The ETA is announced politely. Action buttons are native buttons or links.

RTL & i18n

The step rail mirrors in RTL. Arabic copy is built in; the map canvas stays LTR.

Styling & tokens

Uses --status-success, --status-danger and --brand. Target [data-status].

Do / Don't

  • Do show the reason for a failed delivery.
  • Don't show an ETA after delivery.

CourierCard, MapView, Timeline.

Lab

https://docs.nasaqui.com/?path=/docs/components-delivery-delivery-tracker--docs

On this page