Order confirmation card — Storefront block

Free

storefront-order-confirmation-card · for confirmation pages

Order confirmation card

One centred card with the order, its delivery and its actions: the default after a payment

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-confirmation-card

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontOrderConfirmationCard from '@/components/trame/blocks/storefront/storefront-order-confirmation-card.vue'

const props = {
order: {
id: "cmd-48213",
number: "RB-48213",
date: "October 12, 2026",
status: "paid",
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 shoes on a rock"
},
variant: "Midnight blue · 42",
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: "Orange windbreaker"
},
variant: "Orange · M",
unitPrice: 8900,
id: "l1",
quantity: 1
}
],
totals: {
subtotal: 28600,
shipping: 0,
tax: 4767,
taxIncluded: true,
total: 28600
},
shippingAddress: {
name: "Camille Martin",
line1: "14 Linden Street",
line2: "Building B",
postalCode: "97214",
city: "Portland, OR",
country: "United States"
},
email: "[email protected]",
paymentMethod: "Card ending in 4242",
shippingMethod: "Home delivery",
deliveryEstimate: "Between October 15 and 17"
},
title: "Thank you, your order is confirmed",
nextSteps: "We’re preparing your parcel. You’ll get an email with the tracking number as soon as it leaves the workshop.",
actions: {
track: {
label: "Track my order",
action: "order.track"
},
cancel: {
label: "Cancel the order",
action: "order.cancel"
},
account: {
label: "Create my account",
action: "account.signUp"
},
browse: {
label: "Keep shopping",
action: "catalog"
}
},
options: {
cancelWindow: "You can cancel as long as the parcel hasn’t shipped.",
accountPrompt: "Create an account to track this order and find your addresses next time.",
support: "A question about your order? Write to us at [email protected] and include the number RB-48213."
}
}
</script>

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

Props

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

PropTypeDescription
order*OrderDatathe order just placed
titlestringWordsthe thanks ("Thank you, your order is confirmed")
nextStepsstringWordswhat happens now, as the shop does it ("We prepare your parcel within 48 h")
actionsActionsthe links after the order, each optional
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Order order · 14 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'a confirmation may not say it yet
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
emailstringWordsthe address the confirmation was sent to
paymentMethodstringWords"Visa card ending 4242": as the payment provider reports it
shippingMethodstringWords"Home delivery"
deliveryEstimatestringWordsthe delivery date or window the shop gave, as written: never computed here
currencystringDesignISO 4217, EUR by default
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
Actions actions · 4 props
PropTypeDescription
trackTrackthe link to follow the delivery
cancelCancelthe link to cancel the order
accountAccountthe link to the customer’s account
browseBrowsethe link back to the shop
Track actions.track · 2 props
PropTypeDescription
label*stringWordswhat the button says
action*stringActiona named action of the page
Cancel actions.cancel · 2 props
PropTypeDescription
label*stringWordswhat the button says
action*stringActiona named action of the page
Account actions.account · 2 props
PropTypeDescription
label*stringWordswhat the button says
action*stringActiona named action of the page
Browse actions.browse · 2 props
PropTypeDescription
label*stringWordswhat the button says
action*stringActiona named action of the page
Options options · 4 props
PropTypeDescription
cancelWindowstringWordshow long the order can be cancelled, as the shop wrote it
accountPromptstringWordswhy to create an account, one sentence
supportstringWordshow to reach the shop about this order
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.track, actions.cancel, actions.account, actions.browse
  • Reads orders from your app

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

More storefront blocks

  • Offer popup slide in: A compact nonblocking card positioned by the host; the merchant's own offer only.
  • Offers panel drawer: a slim band naming the offers that opens a side sheet of picture rows, sides alternating: several offers worth a look without taking the page; the merchant’s own offers only.
  • Offers panel inline strip: the offers as a row of cards on the page, scrolling sideways past three: when no overlay is wanted; the merchant’s own offers only.
  • Offers panel launcher stack: a small pill fixed at the bottom corner with the count, opening a compact card of thumbnail rows: offers always at hand on a catalogue or cart page; the merchant’s own offers only.
  • Open books cost breakdown: lines with their amount and a thin proportional bar, and the total: where the price of a product goes; the merchant’s own only.
  • Order detail sheet: a side sheet over the order list, closed back to it: opening one order without leaving the history.
  • Order detail stacked: one column of sections, the lines first, then delivery and payment side by side: an order page read top to bottom.
  • Order detail tabs: the order in one card with "Summary", "Payment" and "Delivery" tabs and its actions on top: a compact order page.

All 409 storefront blocks