Skip to content
Haze UI

AI order status

In-chat live delivery tracker with pulsing status badge, three-stage route progress indicator, expandable courier message form, and replay.

pnpm dlx shadcn@latest add @haze/ai-order-status
Open preview in a new tab
Livesmall script

When to use

  • Answering an order status question inside a support or shopping assistant thread with live ETA telemetry
  • Showing courier transit stages alongside a quick drop-off message form without leaving the conversation
  • Demonstrating real-time arrival progression with an interactive Simulate arrival and Replay toggle

When not to use

  • Completing the initial purchase or modifying item quantities before ordering; use ai-checkout
  • Displaying a static multi-day shipping history log with timestamps; use timeline instead

Installation

Add the Haze registry to components.json once, then install AI order status with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/ai-order-status
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
idstring"haze-ai-order-status"Unique prefix for section heading and courier message form IDs.
headingstring"Live order status"Screen-reader section heading for landmark navigation.
userPromptstring"Where are my flowers?"User message asking for the delivery update.
assistantReplystring"They're on the way with Leo. I'll keep this updated."Assistant reply introducing the live delivery card.
merchantstring"Fern & Petal"Store or restaurant name in the card header.
orderNumberstring"4821"Order reference shown next to the merchant name.
etaTextstring"Arriving around 2:14 pm"Arrival window text displayed above the ETA minutes.
etaMinutesnumber11Estimated minutes remaining before delivery.
courierNamestring"Leo"Assigned courier display name.
courierInitialstring"L"Single-letter avatar initial for the courier badge.
courierVehiclestring"Electric bike"Courier transport description.
quickRepliesstring[]2 quick drop-off chipsSuggested one-click instructions inside the courier message form.
classstring–Extra classes on the outer section.

Keyboard interactions

Tab
Move between Message courier, quick-reply chips, the message input, and Simulate arrival / Replay
EnterSpace
Expand the courier message form, send a drop-off note, or trigger arrival simulation

Accessibility

  • The delivery route bar exposes role="progressbar" with live aria-valuenow updates as the courier moves from 62% transit to 100% delivered.
  • Message courier uses aria-expanded and aria-controls to manage the expandable drop-off note form, and arrival transitions honor prefers-reduced-motion.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI block "AI order status" with `npx shadcn@latest add @haze/ai-order-status`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import AiOrderStatus from "@/components/haze/blocks/ai-order-status.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/ai-order-status.md

  • Customize with real content

    Adapt the Haze ai-order-status block for our product. Replace the demo values of these props with our real content: id, heading, userPrompt, assistantReply, merchant, orderNumber, etaText, etaMinutes, courierName, courierInitial, courierVehicle, quickReplies, class. Keep the layout, the heading level rules and these accessibility details: The delivery route bar exposes role="progressbar" with live aria-valuenow updates as the courier moves from 62% transit to 100% delivered. Message courier uses aria-expanded and aria-controls to manage the expandable drop-off note form, and arrival transitions honor prefers-reduced-motion. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using ai-order-status, check it fits: use it when answering an order status question inside a support or shopping assistant thread with live eta telemetry; showing courier transit stages alongside a quick drop-off message form without leaving the conversation; demonstrating real-time arrival progression with an interactive simulate arrival and replay toggle. Avoid it when completing the initial purchase or modifying item quantities before ordering; use ai-checkout; displaying a static multi-day shipping history log with timestamps; use timeline instead. Alternatives: @haze/ai-checkout, @haze/timeline, @haze/progress.

Dependencies

  • npm: @lucide/astro
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog