Black Friday: 30% off Pro

Get 30% off

Updated

Package Tracker

New

Preview

Customize

Start at stop0
Leg time3.2s
Color
Width860px

Installation

npx shadcn@latest add https://uibrik.com/r/package-tracker.json
Adds the files to components/uibrik/package-tracker and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/package-tracker.

Too large to paste whole, so Copy prompt gives a short prompt that installs it with the CLI. Download the full prompt to attach it instead.

Usage

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) => {}}/>

Where to use Package Tracker

  • Store order pages

    Window, route and scans in one card answer where is my order before anyone writes to support.

    Pairs with Checkout Flow

  • 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.

Props

PackageTracker
live
Type boolean
true
Drive to the next stops on its own.
defaultStop
Type number
0
Stop the van is at on mount.
loop
Type boolean
true
Start over from the first stop a few seconds after delivery.
legSeconds
Type number
3.2
Seconds the van takes between two stops.
hour24
Type boolean
false
Show times in 24-hour format.
color
Type string
"#8e4ec6"
Colour of the route and the van. Turns green on delivery.
width
Type number
860
Width of the card; never wider than its container.
stops
Type { 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
Type string
–
Header text.
leftAt
Type string
"Left at front door"
Shown once the parcel arrives.
driver
Type { 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
Type { weight?: string; items?: number; signature?: boolean }
–
Details shown as chips under the driver.
onCall / onMessage
Type () => void / (text: string) => void
–
Called when the call button is pressed and with each message sent from the card.
reply
Type (text: string) => string | null
–
The driver's reply to a message, shown after a typing indicator. Return null for none.
quickReplies
Type string[]
–
Quick replies offered before the first message.
onArrive
Type (index: number) => void
–
Called each time the van reaches a stop.
className
Type string
–
Classes for the wrapper.