Tally UI

OrderDetail

Full-page order view with line items, totals, and slots for customer, payment, and footer content

Import

import { OrderDetail } from '@tallyui/components';

Usage

<OrderDetail
  orderNumber="#1042"
  status="completed"
  meta={['Today · 14:30', 'Main Street', 'Jane Smith']}
  lineItems={[{ name: 'Espresso', quantity: 2, total: '$9.00' }]}
  subtotal="$9.00"
  discount="-$0.90" couponCodes="SAVE10"
  shipping="$2.00" shippingMethod="Flat rate" fees="$0.50"
  tax="$0.72"
  taxLines={[{ label: 'US 8%', amount: '$0.72' }]}
  total="$11.32"
/>

Rows follow WCPOS v2's order view: Subtotal, Discount, Shipping, Fees, Tax and its rates, Total.

Renders a scrollable detail view for a single order, including a status badge, itemised line items, and totals breakdown. Use the slot props to inject customer info, payment details, or action buttons.

The actions row is pinned below the scroll and is drawn only when at least one of onSync, onReceipt, onReopen, onRefund or onDelete is passed. As in WCPOS v2, Delete and Refund come first on the left, then Sync, with Receipt and Re-open on the right.

Props

PropTypeDefaultDescription
orderNumberstringrequiredDisplay label for the order
statusOrderStatusrequiredStatus value passed to OrderStatusBadge
lineItemsOrderDetailLineItem[]requiredArray of line items
subtotalstringrequiredFormatted subtotal
taxstringrequiredFormatted tax amount
totalstringrequiredFormatted order total
metastring[]—Line under the header ("when · store · cashier"); empty parts are dropped
discountstring—Formatted discount, shown as given (e.g. -$2.00); omit to hide the row
couponCodesstring—Coupon codes, already joined, in a chip beside "Discount"
shippingstring—Formatted shipping total; omit to hide the row
shippingMethodstring—Shipping method title, shown beside "Shipping"
feesstring—Formatted fees total; omit to hide the row
taxLinesOrderDetailTaxLine[]—Per-rate tax breakdown, indented under the Tax row
customerSlotReactNode—Content shown below the header
paymentSlotReactNode—Payment info below the totals
footerSlotReactNode—Actions or notes at the bottom
onReopen() => void—Draws Re-open in the actions row and calls this on press
onSync() => void—Draws Sync in the actions row and calls this on press
onReceipt() => void—Draws Receipt in the actions row and calls this on press
onRefund() => void—Draws Refund in the actions row and calls this on press
onDelete() => void—Draws Delete; the press asks "Delete order …?" and this is called only on confirm
reopenDisabledbooleanfalseDisables Re-open, e.g. while it runs or while storage is degraded
classNamestring—Override container styles

OrderDetailLineItem

interface OrderDetailLineItem {
  name: string;
  quantity: number;
  total: string;
}

OrderDetailTaxLine

interface OrderDetailTaxLine {
  label: string;
  amount: string;
}

Live demo