Order tracking comes with Pro. Its preview shows once you unlock it.
Usage
import { ShopOrderTracking } from './ShopOrderTracking.jsx'
// Without onChangeDelivery or onContact, both answer after a short wait.
<ShopOrderTracking
locale="en"
currency="USD"
order={order} // { number, status, progress, etaSeconds, window, carrier, tracking, courier, stopsBefore, drop, delivery, times }
items={orderLines} // [{ id, name, variant, price, qty, image? }]
loading={!order}
error={trackingError}
onRetry={reload}
onChangeDelivery={async (optionId) => (await api.changeDrop(optionId)).ok}
onContact={async () => (await api.messageCourier()).ok}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text and the sample order. |
order | { number, status, progress, etaSeconds, window, carrier, tracking, courier, stopsBefore, drop, delivery, times } | sample order | The order: status is one of 'ordered' | 'packed' | 'shipped' | 'out' | 'delivered', progress how far along the route (0–1), times the time of each step. |
items | Array<{ id, name, variant, price, qty, image? }> | sample items | What is in the parcel. `image` is the line’s picture; without it a plain parcel is drawn. |
status / progress / eta | string / number / number | — | Override the order’s status, its place on the route and the seconds left, for live updates. |
currency | string | by locale | ISO currency code of the prices. |
loading / error | boolean / boolean | string | false | Shows the skeleton, or the error banner with a retry button (a string replaces its sentence). |
onChangeDelivery / onContact / onRetry | (optionId) => Promise<boolean | void> / () => Promise<boolean | void> / () => void | — | Saves a new way of delivery; messages the courier; reloads after an error. Resolve false to keep the form or button. |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
className | string | — | Added to the root section. |
Add it to your project
Pro includes the full source of this block. Copy its prompt to install it with your coding agent.
ShopOrderTracking.jsxshop-order-tracking.csscopy.jskit.jsxkit.cssui/base-button/ui/copy-button/ui/status-tag/ui/alert-banner/ui/success-check/ui/skeleton-shimmer/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.