Order History Page React block for Tailwind CSS v4
v1.0.0Added in 1.14.0
A React order history page for an ecommerce account: orders grouped by month with search and filters, and a full order detail beside them.
The list shows every order grouped by month: number, status badge, date, item count, total, photos of the items and the actions that fit its status (Track while it is on the way, Buy again once it ended, Invoice unless it was cancelled). Type in the search field (or press / anywhere) to match order numbers, products and SKUs, and pick a status in the filter (a bottom sheet on phones); No orders match offers Clear filters. Click or tap an order to open it: on wide screens it opens beside the list (drag the divider to resize, the open row lifts), below 768px it slides in as its own view with an Orders back button, swipe back and Escape. Arrow keys move between orders, Home and End jump, Enter opens. The detail shows the tracker (status, arrival or delivery time, milestones, courier with the tracking number to copy, shipment history), the items with quantities and prices, the shipping and billing addresses, the payment method and delivery, the summary with discount, shipping, tax and total, and Return items (inside the return window) or Get help. Buy again, Return items and Invoice show a spinner while their promise runs and a toast when done.
Order History Page is a Pro React block in the React blocks category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add order-history-page, together with Badge, Button, Description List, Empty State, Order tracker and 13 more and the npm packages motion and lucide-react.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add order-history-pageOrder History Page is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import OrderHistoryPage from @/components/blocks/order-history-page.
"use client"
import { OrderHistoryPage } from "@/components/blocks/order-history-page"
import type { OrderHistoryOrder } from "@/components/blocks/order-history-page-data"
export function AccountOrders({ orders }: { orders: OrderHistoryOrder[] }) {
return (
<OrderHistoryPage
orders={orders}
currency="USD"
onReorder={async (order) => {
await fetch("/api/cart", { method: "POST", body: JSON.stringify({ items: order.items }) })
}}
onReturn={async (order) => {
await fetch(`/api/orders/${order.id}/returns`, { method: "POST" })
}}
onDownloadInvoice={(order) => {
window.open(`/api/orders/${order.id}/invoice.pdf`, "_blank")
}}
helpHref="/support"
/>
)
}Props
ordersdefault"ORDER_HISTORY_SAMPLE"OrderHistoryOrder[]The orders ({ id, number, placedAt, status, items, shipping, shippingMethod, discount, discountCode, tax, total, shippingAddress, billingAddress, payment, eta, deliveredAt, events, courier, returnBy, invoiceUrl, notice }), sorted by placedAt. Defaults to ORDER_HISTORY_SAMPLE (eight orders of Emma Carter in New York).
currencydefault"USD"stringISO 4217 code for every amount.
localedefault""stringIntl locale for money and dates; empty uses the UIProvider's, then the browser's.
selectedIdstring | nullThe open order, controlled; null opens none. Pair it with onSelect.
defaultSelectedIddefault""string | nullThe open order while uncontrolled. Left out (or empty), wide screens open the newest order; null opens none. Phones always start on the list.
onSelect(id: string | null) => voidCalled when an order is opened.
defaultQuerydefault""stringThe search text on mount.
defaultStatusdefault"all""all" | "processing" | "shipped" | "delivered" | "returned" | "cancelled"The status filter on mount.
onReorder(order: OrderHistoryOrder) => void | Promise<unknown>Buy again: add the order's items to the cart. A promise shows the button loading; simulated by default with a toast.
onReturn(order: OrderHistoryOrder) => void | Promise<unknown>Return items on a delivered order until its returnBy date; simulated by default with a toast.
onDownloadInvoice(order: OrderHistoryOrder) => void | Promise<unknown>Invoice. Left out, Invoice is a download link to the order's invoiceUrl, and hidden when there is none.
onHelp(order: OrderHistoryOrder) => voidGet help; left out it links to helpHref.
helpHrefdefault"/help"stringWhere Get help goes when there is no onHelp.
shopHrefdefault"/"stringThe Continue shopping link under the list and the Start shopping link of the empty state; "" hides both.
groupBydefault"month""month" | "none"Month headings in the list, or one flat list.
showSearchdefaulttruebooleanThe search field over the list.
showFilterdefaulttruebooleanThe status filter next to the search.
showMapdefaultfalsebooleanThe route illustration in the tracker.
showHistorydefaulttruebooleanThe shipment history in the tracker.
searchShortcutdefault"/"stringFocuses the search from anywhere on the page; "" binds nothing.
listWidthdefault400numberThe list column on wide screens in px; drag the divider (or use its arrow keys) to resize.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The tracker's progress and the Buy again button.
radiusdefault"md""sm" | "md" | "lg"Panels and cards: 12, 16 or 24px.
heightdefault"screen""screen" | "fill"screen makes the page exactly the viewport (h-dvh); fill takes what is left in a flex column inside an app shell.
loadingdefaultfalsebooleanSkeleton rows while the orders load.
animateIndefaulttruebooleanRows rise in with a short stagger on mount; off under reduced motion.
nowDate | numberThe reference time for return windows and the tracker; default the live clock.
labelsOrderHistoryPageLabelsInputEvery visible string, English by default (DEFAULT_ORDER_HISTORY_PAGE_LABELS): title, description, statuses, actions, section titles, toasts, the empty and no-results states.
classNamestringClasses for the root.
classNamesPartial<Record<OrderHistoryPageSlot, string>>Classes for header, toolbar, list, group, row, detail, tracker, items, details, summary, help and empty.
Parts
DEFAULT_ORDER_HISTORY_PAGE_LABELS
constantThe English strings for every visible label, the default of labels.
ORDER_HISTORY_STATUS_TONES
constantThe badge tone of each status: processing neutral, shipped info, delivered success, returned neutral, cancelled danger.
ORDER_HISTORY_SAMPLE
constantEight sample orders from August to November 2026 (shipped, processing, delivered with a discount, returned, cancelled).
ORDER_HISTORY_NOW
constantThe sample's clock (Nov 6, 2026, 2:30 PM), so arrival times and return windows stay stable.
orderSubtotal
functionThe sum of price x quantity over an order's items.
orderTotal
functionThe amount charged: the order's total, else subtotal - discount + shipping + tax.
OrderHistoryPageProps
typeProps of OrderHistoryPage, including the div attributes of the root.
OrderHistoryOrder
typeOne order: number, placedAt, status, items, amounts, addresses, payment and the tracker's eta, events and courier.
OrderHistoryItem
type{ id, title, variant?, image?, quantity, price, sku? }: one line of an order.
OrderHistoryAddress
type{ name, company?, line1, line2?, city, region?, postalCode, country?, phone? }.
OrderHistoryPayment
type{ method, last4?, note? }: Visa ending in 4242, Apple Pay, PayPal.
OrderHistoryStatus
type"processing" | "shipped" | "delivered" | "returned" | "cancelled".
OrderHistoryPageLabels
typeEvery label, as in DEFAULT_ORDER_HISTORY_PAGE_LABELS.
OrderHistoryPageLabelsInput
typeThe shape of labels: any subset of OrderHistoryPageLabels, with statuses merged one by one.
OrderHistoryStatusFilter
typeAn OrderHistoryStatus or "all", the type of defaultStatus.
Examples
Phone layout
In a 390px column the rows become cards and an order slides in as its own view with a back button.
Brand tone with the route map
tone="brand", radius="lg" and showMap on an order that is on its way.
Delivered orders and returns
Filtered to delivered, with Return items inside the return window and an Invoice handler.
No results
A search that matches nothing offers Clear filters.
Empty account
No orders yet, with a Start shopping link.
Loading
Skeleton rows in the real layout while the orders load.
A failing action
onReorder rejects: the button stops loading and an error toast shows the message.
Euros, de-DE formatting
currency="EUR" with locale="de-DE" for amounts and dates.
Dependencies
Files
- components/blocks/order-history-page.tsx
- components/blocks/order-history-page-data.ts
FAQ
Is the React Order History Page block free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Order History Page?
Run npx wingo-ui@latest add order-history-page. It also adds the Wingo UI items it builds on (Badge, Button, Description List, Empty State, Order tracker and 13 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/order-history-page.
How does Order History Page behave on phones?
Type in the search field (or press / anywhere) to match order numbers, products and SKUs, and pick a status in the filter (a bottom sheet on phones); No orders match offers Clear filters.
See also
More React blocks
Articles using this component
- Order History Page Design: List, Detail and Actions
Build it: screens and apps9 min read