# Package Tracker

> A parcel on its way, in one wide card. On the left, an isometric city with buildings, parks, traffic and drifting cloud shadows; the route is traced along the streets, numbered pins drop in as each stop is reached and a van drives from one to the next. At the door the van hands the parcel over, the house lights up and the card turns green, and on autoplay the run starts over. On the right, the delivery window narrows as stops go by and counts the drops before yours on the last street, with the driver (call and message), the parcel's details and tracking steps that tick off as the van arrives. Stacks on narrow screens.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Blocks › Cards |
| Live preview | https://uibrik.com/components/package-tracker |
| Writes | 1 file into `components/uibrik/package-tracker/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 27, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/package-tracker.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/package-tracker`.

Can't run commands? https://uibrik.com/components/package-tracker/prompt-full.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { PackageTracker } from "@/components/uibrik/package-tracker/package-tracker";

const stops = [
  {
    title: "Picked up",
    place: "Oakland warehouse",
    time: "07:12",
    scans: [
      { time: "06:48", text: "Label scanned, 1.4 kg" },
      { time: "07:12", text: "Loaded onto trailer 22" },
    ],
  },
  {
    title: "At sort hub",
    place: "Hayward, CA",
    time: "09:40",
    scans: [
      { time: "09:31", text: "Arrived at sort hub" },
      { time: "09:40", text: "Sorted to route SM-14" },
    ],
  },
  // …3 more
];

const driver = {
  name: "Marcus Hale",
  rating: 4.9,
  vehicle: "Electric van",
  plate: "7KTR482",
  avatar: "/registry/package-tracker/driver.webp",
  phone: "+15550142",
};

const quickReplies = ["Leave it at the door", "I'm home", "Please ring the bell"];

<PackageTracker
  live
  defaultStop={0}
  loop
  legSeconds={3.2}
  hour24={false}
  color="#8e4ec6"
  width={860}
  stops={stops}
  order="Order #4821"
  carrier="Swift Parcel"
  leftAt="Left at front door"
  driver={driver}
  parcel={{ weight: "1.4 kg", items: 2, signature: false }}
  quickReplies={quickReplies}
  onArrive={(index) => {}}
  // onCall={() => {}}
  // onMessage={(text) => {}}
  // reply={(text) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/package-tracker.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `live` | `boolean` | `true` | Drive to the next stops on its own. |
| `defaultStop` | `number` | `0` | Stop the van is at on mount. |
| `loop` | `boolean` | `true` | Start over from the first stop a few seconds after delivery. |
| `legSeconds` | `number` | `3.2` | Seconds the van takes between two stops. |
| `hour24` | `boolean` | `false` | Show times in 24-hour format. |
| `color` | `string` | `"#8e4ec6"` | Colour of the route and the van. Turns green on delivery. |
| `width` | `number` | `860` | Width of the card; never wider than its container. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `stops` | `{ title: string; place: string; time: string; scans?: { time: string; text: string }[] }[]` |  | Two to five stops, first pickup to last delivery. Times are "HH:MM" in 24-hour time. |
| `order / carrier` | `string` |  | Header text. |
| `leftAt` | `string` | `"Left at front door"` | Shown once the parcel arrives. |
| `driver` | `{ name: string; rating?: number; vehicle?: string; plate?: string; avatar?: string; phone?: string }` |  | Who is driving. phone makes the call button a tel: link; avatar is a photo URL, initials without one. |
| `parcel` | `{ weight?: string; items?: number; signature?: boolean }` |  | Details shown as chips under the driver. |
| `onCall / onMessage` | `() => void / (text: string) => void` |  | Called when the call button is pressed and with each message sent from the card. |
| `reply` | `(text: string) => string \| null` |  | The driver's reply to a message, shown after a typing indicator. Return null for none. |
| `quickReplies` | `string[]` |  | Quick replies offered before the first message. |
| `onArrive` | `(index: number) => void` |  | Called each time the van reaches a stop. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Store order pages**: Window, route and scans in one card answer where is my order before anyone writes to support. Pairs with [Checkout Flow](https://uibrik.com/components/checkout-flow.md) (Pro).
- **Delivery and courier apps**: The van moving between real stops makes the estimate feel live, and the scans back it up.
- **Email and notification landing pages**: Link a shipping update straight to a card that shows the whole journey at a glance.

## Same shelf: Cards

- [Performance Meter](https://uibrik.com/components/performance-meter.md) (Pro): A half-circle gauge in five shades of one colour whose needle revs up like a car under hard acceleration, easing back at each shift, overshooting and straining at the end, then trembling at speed with surges toward the stop; the bands light and the score counts up as it climbs, and a shine runs along the bands when it lands.
- [PR Review Card](https://uibrik.com/components/pr-review-card.md) (Pro): A pull request in three small tiles: a ring of checks, a stack of reviewers and the change size. Picking a tile opens its detail under the row, running checks finish live, and Merge unlocks once checks pass and enough reviewers approve.
- [Security Scan](https://uibrik.com/components/security-scan.md) (Pro): A security check that runs itself for a bento tile: a shield outline draws in and a band of light sweeps through it while checks resolve one by one, then the shield fills, a check draws across it and a pulse rolls out.
- [Signal Filter](https://uibrik.com/components/signal-filter.md) (Pro): Anonymous traffic drifts across a curved sheet into a scanner line: grey silhouettes, visitor chips and empty coins come out the other side as real faces with a check, subscriber chips and paid coins, the change wiping through each one exactly where it crosses.
- [Subscriber Funnel](https://uibrik.com/components/subscriber-funnel.md) (Pro): A crowd of avatars waiting above a funnel; one at a time they drop in, are taken in by your mark, and come out as a new subscriber card while the count rolls up.
- [Terminal Demo](https://uibrik.com/components/terminal-demo.md) (Pro): A terminal that plays a short session on view: the command types itself, output arrives line by line and a progress bar fills.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/package-tracker/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
