Order detail tabs — Storefront block

Pro

storefront-order-detail-tabs · for account, order pages

Order detail tabs

The order in one card with "Summary", "Payment" and "Delivery" tabs and its actions on top: a compact order page

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/storefront-order-detail-tabs

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontOrderDetailTabs from '@/components/trame/blocks/storefront/storefront-order-detail-tabs.vue'

const props = {
order: {
id: "cmd-48213",
number: "RB-48213",
date: "October 10, 2026",
status: "shipped",
lines: [
{
product: {
id: "p1",
name: "Trail Path running shoe",
image: "https://images.unsplash.com/photo-1575987116913-e96e7d490b8a?w=1600&q=80",
alt: "Tan leather hiking boots on a rock"
},
variant: "Midnight blue · 9",
unitPrice: 12900,
id: "l0",
quantity: 1
},
{
product: {
id: "p2",
name: "Ridge windbreaker",
image: "https://images.unsplash.com/photo-1591047139829-d91aecb6caea?w=1600&q=80",
alt: "An orange windbreaker"
},
variant: "Orange · M",
unitPrice: 8900,
id: "l1",
quantity: 1
}
],
totals: {
subtotal: 28600,
shipping: 490,
shippingLabel: "Home delivery",
tax: 4848,
taxIncluded: true,
total: 29090
},
shippingAddress: {
name: "Camille Roux",
line1: "14 rue des Tanneurs",
postalCode: "69001",
city: "Lyon",
country: "France",
phone: "+33 6 12 34 56 78"
},
deliveryMethod: "Home delivery",
expected: "Tuesday 14 to Wednesday 15 October",
payment: {
method: "Visa ending in 4242",
status: "paid",
date: "October 10, 2026"
},
tracking: {
carrier: "TrackPost",
number: "8L00123456789",
events: [
{
date: "Oct 12, 08:14",
label: "Out for delivery",
place: "Lyon",
done: true
},
{
date: "Oct 11, 21:40",
label: "Arrived at the local depot",
place: "Vénissieux",
done: true
}
]
}
},
title: "Order details",
actions: {
invoice: "order.invoice",
track: "order.track",
cancel: "order.cancel",
return: "order.return",
reorder: "order.reorder",
help: "order.help",
back: "account.orders"
}
}
</script>

<template>
<StorefrontOrderDetailTabs v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
order*OrderDatathe signed-in customer’s own order
titlestringWordsthe heading, e.g. "Order details"; absent: the order’s number
actionsActionswhat the order offers; each one is shown only when the page has it and the order’s status allows it
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Order order · 13 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
number*stringWordsthe order’s number as the shop shows it
date*stringWordsthe date as the shop writes it
status*'pending' | 'paid' | 'preparing' | 'shipped' | 'delivered' | 'cancelled' | 'returned' | 'refunded'where the order stands
statusLabelstringWordsthe status in the shop’s words, instead of the block’s own
lines*(Line | Line)[]full cart lines, or summaries (name, quantity, total) when the tool keeps only those
totals*Totalsthe order’s amounts
shippingAddressShippingAddresswhere it is delivered
trackingTrackingthe carrier’s tracking, once shipped
paymentPaymentthe payment, as the payment provider recorded it
billingAddressBillingAddresswhere the invoice goes, when it differs from the delivery address
expectedstringWordsthe delivery window the shop or the carrier gives, e.g. "Thursday 14 to Saturday 16 November"
deliveryMethodstringWordshow it travels, e.g. "Home delivery" or "Pick-up point: Harbour Café"
Totals order.totals · 11 props
PropTypeDescription
subtotal*numberan amount in cents
discountnumberan amount in cents
discountLabelstringWordswhat the discount is, e.g. a code’s name
shippingnumber | nullnull: computed at the next step
shippingLabelstringWordsthe delivery method, e.g. "Standard delivery"
feesnumberfees the shop charges on top (service, handling), when it does
feesLabelstringWordswhat the fees are ("Service fee")
taxnumberan amount in cents
taxIncludedbooleantrue: the prices include tax
total*numberan amount in cents
currencystringDesignISO 4217, EUR by default
ShippingAddress order.shippingAddress · 7 props
PropTypeDescription
name*stringWordsthe recipient’s name
line1*stringWordsstreet and number
line2stringWordsa second address line: building, floor
postalCode*stringWordsthe postcode
city*stringWordsthe town
country*stringWordsthe country
phonestringWordsa phone number for the delivery
Tracking order.tracking · 4 props
PropTypeDescription
carrierstringWordswho carries it, e.g. "Colissimo"
numberstringWordsthe carrier’s tracking number
urlstringDesignthe carrier’s tracking page
eventsEvent[]the carrier’s tracking events
Event order.tracking.events[] · 4 props
PropTypeDescription
date*stringWordswhen it happened, as the carrier writes it
label*stringWordswhat happened, e.g. "Out for delivery"
placestringWordswhere it happened
done*booleantrue: this event has happened
Payment order.payment · 4 props
PropTypeDescription
method*stringWordshow it was paid, as the payment provider names it, e.g. "Visa ending in 4242"
status'paid' | 'pending' | 'refunded' | 'partially-refunded' | 'failed'where the payment stands
datestringWordswhen it was paid, as the shop writes it
refundednumberthe amount refunded so far, in cents
BillingAddress order.billingAddress · 7 props
PropTypeDescription
name*stringWordsthe recipient’s name
line1*stringWordsstreet and number
line2stringWordsa second address line: building, floor
postalCode*stringWordsthe postcode
city*stringWordsthe town
country*stringWordsthe country
phonestringWordsa phone number for the delivery
Actions actions · 7 props
PropTypeDescription
invoicestringActionthe order’s invoice, a link the host serves (a PDF)
trackstringActionthe order’s tracking page; offered while it is on its way
cancelstringActioncancels the order before it leaves, asked to confirm first; offered while it is pending, paid or being prepared
returnstringActionstarts a return; offered once it is delivered
reorderstringActionputs the order’s products back in the cart
helpstringActioncontact about this order
backstringActionwhere "All orders" leads: the customer’s order list
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
moneyformats a price, given in cents
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: actions.invoice, actions.track, order.cancel, actions.return, order.reorder, actions.help, actions.back
  • Reads orders, shipments from your app

A storefront section, for account, order pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More storefront blocks

  • Order confirmation card: one centred card with the order, its delivery and its actions: the default after a payment.
  • Order confirmation receipt: the order’s four facts side by side above its lines and totals: a customer who wants the record at a glance.
  • Order confirmation table: a bordered panel with the order’s header and a table of items: orders with many lines or a delivery date per line.
  • Order list cards: one card per order with its pictures and a progress line: a customer with a few orders to follow.
  • Order list reorder grid: the products already bought, to put back in the cart in one click: consumables and repeat purchases.
  • Order list rows: compact lines with the number, status, total and actions: a customer who orders often and scans the history.
  • Order list timeline: orders grouped in progress and finished, each with one honest line of status: a customer who wants to know what is on its way.
  • Order lookup form and result: a guest types the order number and e-mail, the result appears below: orders placed without an account.

All 409 storefront blocks