Order History List
A stacked list of past-order cards for an account page: order number and date, a color-coded status badge, a small row of item thumbnails with an item count, the order total, and a View details link. Drops straight into an orders or account-history page.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge, button, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/order-history-list.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce32.tsx instead.
Usage
The file also exports ecommerce32Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Ecommerce32, ecommerce32Demo } from "@/components/blocks/ecommerce/ecommerce32"; export default function Page() { return <Ecommerce32 {...ecommerce32Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Order history" | Heading above the order list. |
| orders | OrderItem[] | [] | Order cards, rendered top to bottom in the given order. |
| className | string | none | Extra classes for the outer section element. |
Types
type OrderStatus = "Delivered" | "Shipped" | "Processing" | "Cancelled"; type OrderItem = { orderNumber: string; date: string; status: OrderStatus; itemCount: number; total: string; thumbnails?: { src: string; alt: string }[]; detailsHref?: string; };
Behavior notes
- Fully static and presentational: there are no click handlers or state anywhere in this block, aside from the real Link navigation on View details.
- status maps to one of four literal Tailwind color combinations (Delivered=emerald, Shipped=sky, Processing=amber, Cancelled=red) applied to the Badge's className, since none of these are semantic theme tokens.
- Only the first 3 thumbnails render per order even if more are supplied; when thumbnails is empty or omitted, a single placeholder tile with a Package icon renders instead.
- View details always renders, defaulting detailsHref to "#" when not supplied, via the Button component's render prop wrapping a real next/link Link.
More Ecommerce Blocks
View all →wishlist-manager
Wishlist Manager
Saved-items list with stock-status badges, move-to-cart and remove actions, and a real empty state.
product-information-tabs
Product Information Tabs
Tabbed product details with Description, Features, Specifications, Reviews, and Shipping panels.
collection-showcase-grid
Collection Showcase Grid
A large featured-collection hero card alongside a grid of smaller supporting collection tiles.
shop-by-brand-grid
Shop by Brand Grid
A grid of bordered brand tiles with a wordmark-style name, product count, and a hover affordance.
sale-countdown-timer
Sale Countdown Timer
A live days/hours/minutes/seconds countdown in default, compact, or full-width banner layouts.
gift-card-redemption-form
Gift Card Redemption Form
A code-entry form that validates against a fixed list of demo gift cards and shows a real success or error state.