Order Tracker

Pro

Where an order, a parcel or a ride is right now, as an assistant answers "where is my order?": when it lands, which stage it is at and what just happened. A full card for one order, a row that opens in place when there are several.

LRLuna RamenOrder #4821 · 2 itemsOn the way
Arrives
8:15 – 8:30 PMOn time
Placed, done
Preparing, done
On the way
Delivered
L

Picked up by Liam, 2 min ago

Installation#

# One-time setup (tokens + lib helpers)npx koalaui-cli@latest init# Activate your Pro license (once per machine)npx koalaui-cli@latest login <key># Add this component (its dependencies come along)npx koalaui-cli@latest add order-tracker

Usage#

This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

Anatomy#

A header that names the merchant and the stage, and the content under it: when it lands, the stages, the latest event, what is in the box, the numbers to quote and the actions. Every part under the header is droppable: a ride needs only the ETA and the update.

import {  OrderTracker,  OrderTrackerHeader,  OrderTrackerMark,  OrderTrackerTitle,  OrderTrackerMeta,  OrderTrackerStatus,  OrderTrackerContent,  OrderTrackerEta,  OrderTrackerSteps,  OrderTrackerStep,  OrderTrackerUpdate,  OrderTrackerMedia,  OrderTrackerItems,  OrderTrackerThumbnails,  OrderTrackerItem,  OrderTrackerSummary,  OrderTrackerDetails,  OrderTrackerDetail,  OrderTrackerActions,  OrderTrackerSkeleton,} from "@/components/ui/order-tracker"<OrderTracker>  <OrderTrackerHeader>    <OrderTrackerMark />    <OrderTrackerTitle />    <OrderTrackerMeta />    <OrderTrackerStatus />  </OrderTrackerHeader>  <OrderTrackerContent>    <OrderTrackerEta />    <OrderTrackerSteps>      <OrderTrackerStep />    </OrderTrackerSteps>    <OrderTrackerUpdate />    <OrderTrackerMedia />    <OrderTrackerItems>      <OrderTrackerThumbnails>        <OrderTrackerItem />      </OrderTrackerThumbnails>      <OrderTrackerSummary />    </OrderTrackerItems>    <OrderTrackerDetails>      <OrderTrackerDetail />    </OrderTrackerDetails>    <OrderTrackerActions />  </OrderTrackerContent></OrderTracker><OrderTrackerSkeleton />

Status#

Six, set once on the root with status. The chip words and tones itself from it, the bars fill up to the matching stage, and the timing pill turns amber when the order is delayed. A cancelled order keeps its ETA struck through and its bars greyed at the stage it reached, set with value, so the reply still says how far it got.

LRLuna RamenOrder #4821Placed
Arrives
8:25 – 8:40 PMOn time
Placed
Preparing
On the way
Delivered

Sent to the restaurant

LRLuna RamenOrder #4821Preparing
Arrives
8:20 – 8:35 PMOn time
Placed, done
Preparing
On the way
Delivered

The kitchen started your order

LRLuna RamenOrder #4821On the way
Arrives
8:15 – 8:30 PMOn time
Placed, done
Preparing, done
On the way
Delivered

Picked up by Liam

LRLuna RamenOrder #4821Delivered
Delivered
8:22 PMOn time
Placed, done
Preparing, done
On the way, done
Delivered, done

Left at the front door

LRLuna RamenOrder #4821Delayed
Arrives
8:35 – 8:50 PMDelayed 15 min
Placed, done
Preparing, done
On the way
Delivered

Heavy traffic on Atlantic Ave

LRLuna RamenOrder #4821Cancelled
Was due
8:15 – 8:30 PM
Placed, done
Preparing
On the way
Delivered

The restaurant closed early. Refund on its way.

Live updates#

Pass live while the order is moving and feed the card new props as events arrive. The status label rolls to the next stage, the fill slides one bar along on the same settle curve the Stepper uses, the current bar breathes, and the update line is a polite live region. Wrap the ETA in AnimatedNumber and the update in AnimatedLabel so only the characters that change move.

LRLuna RamenOrder #4821 · 2 itemsPlaced
Arrives
8:25 – 8:40 PMOn time
Placed
Preparing
On the way
Delivered

Sent to Luna Ramen, Just now

Compact#

layout="compact" turns the header into one line you can click: the mark, the merchant over the stage, and the ETA on the right over its timing. A live row leads the stage with a spinner. The card grows to show the rest, the same object getting taller rather than a panel swapping in. Use it when the assistant lists several orders.

Placed, done
Preparing, done
On the way
Delivered

Picked up by Liam

With a map#

For a ride or a courier, put a Map in OrderTrackerMedia: the frame insets it 8px from the card with a concentric radius. The route is an app layer in the theme's brand colour, and the courier is a photo pin that pings.

LRLuna RamenOrder #4821 · 2 itemsOn the way
Arrives
8:15 – 8:25 PMOn time
L

Picked up by Liam, 2 min ago

In a conversation#

A parcel lookup, as a support assistant answers it: the stages a carrier uses, the last scan, the thumbnails and total of what is in the box, and the order and tracking numbers with a copy button each. The card takes the full width of the reply, with no bubble around it.

Where is my order from Clay & Kiln?
It left the Newark sorting facility this morning and is on track for Thursday. UPS is carrying it; the tracking number is below if you want to follow it yourself.
Clay & KilnOrdered Nov 2In transit
Arrives
Thu, Nov 6On time
Ordered, done
Shipped
Out today
Delivered

Departed the Newark sorting facility, Today, 6:12 AM

Lyme bowl
Dune plate
Carved vase
3 items · $124.00
Order
CK-20931
Carrier
UPS Ground
Tracking number
1Z 999 AA1 01 2345 6784

Loading#

While the lookup streams in, OrderTrackerSkeleton holds its place in the same frame, with the lines and the four bars where they will land.

API reference#

OrderTracker

One order, an <article>, and the context every part reads. Every part accepts className, merged last, and forwards its element's props. orderTrackerVariants is the recipe.

PropTypeDefaultDescription
status"placed" | "preparing" | "on-the-way" | "delivered" | "delayed" | "cancelled""placed"Where the order stands. Words and tones OrderTrackerStatus, picks the stage OrderTrackerSteps marks, tones the ETA's timing pill, and strikes the ETA through when cancelled.
livebooleanfalseThe order is still moving and the card will update. The status dot and the current stage pulse, a compact row shows a spinner, and OrderTrackerUpdate becomes a polite live region. Ignored once the order is delivered or cancelled.
layout"full" | "compact""full"full shows everything at once. compact makes the header a one-line disclosure and folds OrderTrackerContent under it, opening in place.
openboolean-Controlled open state of a compact card.
defaultOpenbooleanfalseInitial open state of a compact card.
onOpenChange(open: boolean) => void-Called when a compact card opens or closes.
Data attributeDescription
data-slot"order-tracker".
data-statusThe status.
data-layout"full" or "compact".
data-livePresent while live and the order is still on its way.
data-stateopen or closed, on a compact card only.

OrderTrackerHeader

Who and how far, as a two-row grid: the mark, then the title over the meta, then the status. In a compact card it is the Radix Collapsible.Trigger (a <button>), puts the status under the title, takes an OrderTrackerEta on the right and adds the caret; in a full card it is a <div>.

Data attributeDescription
data-slot"order-tracker-header".

OrderTrackerMark

The merchant's or carrier's mark, an Avatar: 40px in a full card, 32px in a compact one. Children are the fallback, initials or a glyph. Forwards Avatar props such as color.

PropTypeDefaultDescription
srcstring-A logo image. The children show until it loads, or if it fails.
altstring""The image's alt text. Empty by default, since the title names the merchant.
Data attributeDescription
data-slot"order-tracker-mark".

OrderTrackerTitle

The merchant, a <span>. Truncates on one line.

Data attributeDescription
data-slot"order-tracker-title".

OrderTrackerMeta

The order number, the date or the item count, a muted <span> under the title. In a compact card it drops to a third line, so leave it out there.

Data attributeDescription
data-slot"order-tracker-meta".

OrderTrackerStatus

The stage in words, from the root's status. A dot Badge in a full card; in a compact card a muted line under the title, led by a spinner while live or a toned dot otherwise. A new status rolls its label in place.

PropTypeDefaultDescription
variant"default" | "info" | "success" | "warning" | "destructive"-Overrides the tone the status picks.
childrenReact.ReactNode-Overrides the wording (Placed, Preparing, On the way, Delivered, Delayed, Cancelled), say In transit for a parcel.
Data attributeDescription
data-slot"order-tracker-status".

OrderTrackerContent

Everything under the header, a <div> stacking its parts 16px apart. In a compact card it is the Radix Collapsible.Content: its height tweens open and shut and the parts fade in with it.

Data attributeDescription
data-slot"order-tracker-content".
data-stateopen or closed, in a compact card.

OrderTrackerEta

When it lands, the card's hero value: 24px semibold in tabular-nums, with a timing pill beside it. Inside a compact header it shrinks to a right-aligned value over the timing in its tone.

PropTypeDefaultDescription
labelReact.ReactNode-A small caption above the value (Arrives, Delivered). Read out, not shown, in a compact header.
timingReact.ReactNode-How it compares to the promise (On time, Delayed 10 min).
timingVariant"default" | "info" | "success" | "warning" | "destructive"-The timing's tone. Defaults to warning when the order is delayed, destructive when cancelled, success otherwise.
Data attributeDescription
data-slot"order-tracker-eta"; the value is "order-tracker-eta-value" and the pill "order-tracker-eta-timing".

OrderTrackerSteps

The stages as a row of bars, composed from Stepper's bars variant and exposed as a list. Stages up to the current one are filled, the current one is named in ink and announced with aria-current="step", and the fill slides along when the stage moves. Children are OrderTrackerSteps.

PropTypeDefaultDescription
valuenumber-The current stage, counted from 1. Leave it out with the usual four stages and it follows the status: placed 1, preparing 2, on the way 3, delivered all done. Set it for other stage lists and for a cancelled or delayed order.
Data attributeDescription
data-slot"order-tracker-steps".

OrderTrackerStep

One stage. The children are its name, clamped to one line under its bar.

PropTypeDefaultDescription
doneLabelstring"done"Read after the name of a finished stage.
Data attributeDescription
data-slot"order-tracker-step".
data-progressdone, current or upcoming.

OrderTrackerUpdate

The latest event in one line, with an optional courier avatar in front and the time after it. A polite live region while the order is live, so a screen reader hears each new update.

PropTypeDefaultDescription
srcstring-The courier's photo, a 24px avatar.
altstring""The photo's alt text. Empty by default, since the update names the courier.
fallbackReact.ReactNode-Initials shown until the photo loads, or without one.
timeReact.ReactNode-When it happened (2 min ago), muted after a middle dot.
Data attributeDescription
data-slot"order-tracker-update".

OrderTrackerMedia

An inset frame for a route map or a photo of the parcel at the door, aspect-video with a concentric radius and a hairline edge. Place a Map or an image inside it.

Data attributeDescription
data-slot"order-tracker-media".

OrderTrackerItems

What is in the order, a row: thumbnails on the left, a summary beside them.

Data attributeDescription
data-slot"order-tracker-items".

OrderTrackerThumbnails

The strip of item thumbnails, a role="list".

Data attributeDescription
data-slot"order-tracker-thumbnails".

OrderTrackerItem

One 40px thumbnail with a hairline edge, a role="listitem". Children replace the photo, a glyph for instance.

PropTypeDefaultDescription
srcstring-The item's photo.
altstring""The item's name, read to a screen reader.
Data attributeDescription
data-slot"order-tracker-item".

OrderTrackerSummary

The count and the total ("3 items · $124.00"), a muted <span> in tabular-nums.

Data attributeDescription
data-slot"order-tracker-summary".

OrderTrackerDetails

Order number, carrier and tracking number, a <dl> ruled off by a hairline.

Data attributeDescription
data-slot"order-tracker-details".

OrderTrackerDetail

One label and its value, a <dt> and <dd> in a <div>, with an optional copy button after the value.

PropTypeDefaultDescription
label*React.ReactNode-What the value is.
children*React.ReactNode-The value as shown, spaced for reading if you like.
copyValuestring-Adds a copy button that writes this to the clipboard, so a spaced number copies without its spaces.
copyLabelstringCopy ${label}The copy button's name.
copiedLabelstring"Copied"Its name for a moment after copying, while the glyph turns into a check.
Data attributeDescription
data-slot"order-tracker-detail"; the button is "order-tracker-copy".

OrderTrackerActions

The buttons, a <div> aligned to the end. App UI: size="sm" buttons, text only.

Data attributeDescription
data-slot"order-tracker-actions".

OrderTrackerSkeleton

A placeholder in the same frame while the lookup streams in: the mark, the lines, the ETA, the four bars and the update where they will land. Hidden from assistive tech.

PropTypeDefaultDescription
layout"full" | "compact""full"Which card it stands in for.
Data attributeDescription
data-slot"order-tracker-skeleton".

FAQ#

No. It renders what you pass. Subscribe to your carrier or dispatch feed however you already do, and hand the card the new status, ETA and update; it animates the change. Turn live off once the order lands.