Return request stepped — Storefront block
Prostorefront-return-request-stepped · for account, returns pages
Return request stepped
The request on one page in three numbered steps (items, reason, way back), a summary beside it
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-return-request-steppedUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontReturnRequestStepped from '@/components/trame/blocks/storefront/storefront-return-request-stepped.vue'
const props = {
title: "Return an item",
lead: "Choose the order and the items, tell us why: we’ll reply by email with the next steps.",
orders: [
{
id: 1046,
number: "RV-1046",
date: "October 2, 2026",
status: "delivered",
lines: [
{
id: "a",
product: {
id: "a",
name: "Glazed stoneware bowl",
image: "https://images.unsplash.com/photo-1530006498959-b7884e829a04?w=1600&q=80",
alt: "Glazed stoneware bowl"
},
variant: "Off-white",
unitPrice: 2400,
quantity: 1
},
{
id: "b",
product: {
id: "b",
name: "Tall mug",
image: "https://images.unsplash.com/photo-1733046889345-25938f38c8e7?w=1600&q=80",
alt: "Tall mug"
},
variant: "Midnight blue",
unitPrice: 1800,
quantity: 1
}
],
totals: {
subtotal: 9000,
total: 9000
}
},
{
id: 1043,
number: "RV-1043",
date: "August 30, 2026",
status: "delivered",
lines: [
{
id: "d",
product: {
id: "d",
name: "Blown-glass carafe"
},
variant: "34 oz",
unitPrice: 5200,
quantity: 1
},
{
id: "e",
product: {
id: "e",
name: "Water glass"
},
variant: "Set of 4",
unitPrice: 1200,
quantity: 2
}
],
totals: {
subtotal: 7600,
total: 7600
}
}
],
reasons: [
"Too big",
"Too small"
],
methods: [
{
id: "label",
label: "Label sent by email",
text: "Print the label and drop the package off at a pickup point."
},
{
id: "dropoff",
label: "Drop off in store",
text: "Bring the item and your order number to the workshop."
}
],
submit: {
label: "Send my request",
action: "requestReturn"
},
options: {
footnote: "Personalized items can’t be returned or exchanged.",
policyLink: {
label: "Read the return policy",
action: "returnPolicy"
},
photos: true
}
}
</script>
<template>
<StorefrontReturnRequestStepped v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the page does ("Return an item") |
| lead | string | Wordsone sentence on how it works, with the delays only as the merchant set them |
| orders* | Order[] | Datathe customer’s orders that can still be returned |
| reasons | string[] | Wordsa reason a customer can pick ("Too small") |
| methods | Method[] | the ways to send the items back, e.g. "Prepaid postal label" |
| submit* | Submit | the submit action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Order orders[] · 9 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| number* | string | Wordsthe order’s number as the shop shows it |
| date* | string | Wordsthe date as the shop writes it |
| status* | 'pending' | 'paid' | 'preparing' | 'shipped' | 'delivered' | 'cancelled' | 'returned' | 'refunded' | where the order stands |
| statusLabel | string | Wordsthe status in the shop’s words, instead of the block’s own |
| lines* | Line[] | the order’s lines, each with its product and unit price |
| totals* | Totals | the order’s amounts |
| shippingAddress | ShippingAddress | where it is delivered |
| tracking | Tracking | the carrier’s tracking, once shipped |
Line orders[].lines[] · 8 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| product* | Product | the product on the line |
| variant | string | Wordsthe chosen options, written out ("Navy · 42") |
| unitPrice* | number | an amount in cents |
| compareAt | number | an amount in cents |
| quantity* | number | how many, at least 1 |
| maxQuantity | number | the most the line may hold |
| note | string | Wordsa line note: a gift, a delivery delay |
Product orders[].lines[].product · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe product’s name |
| image | string | null | Picturethe main picture; null or absent: the product has none yet |
| alt | string | Wordswhat the main picture shows |
Totals orders[].totals · 11 props
| Prop | Type | Description |
|---|---|---|
| subtotal* | number | an amount in cents |
| discount | number | an amount in cents |
| discountLabel | string | Wordswhat the discount is, e.g. a code’s name |
| shipping | number | null | null: computed at the next step |
| shippingLabel | string | Wordsthe delivery method, e.g. "Standard delivery" |
| fees | number | fees the shop charges on top (service, handling), when it does |
| feesLabel | string | Wordswhat the fees are ("Service fee") |
| tax | number | an amount in cents |
| taxIncluded | boolean | true: the prices include tax |
| total* | number | an amount in cents |
| currency | string | DesignISO 4217, EUR by default |
ShippingAddress orders[].shippingAddress · 7 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe recipient’s name |
| line1* | string | Wordsstreet and number |
| line2 | string | Wordsa second address line: building, floor |
| postalCode* | string | Wordsthe postcode |
| city* | string | Wordsthe town |
| country* | string | Wordsthe country |
| phone | string | Wordsa phone number for the delivery |
Tracking orders[].tracking · 4 props
| Prop | Type | Description |
|---|---|---|
| carrier | string | Wordswho carries it, e.g. "Colissimo" |
| number | string | Wordsthe carrier’s tracking number |
| url | string | Designthe carrier’s tracking page |
| events | Event[] | the carrier’s tracking events |
Event orders[].tracking.events[] · 4 props
| Prop | Type | Description |
|---|---|---|
| date* | string | Wordswhen it happened, as the carrier writes it |
| label* | string | Wordswhat happened, e.g. "Out for delivery" |
| place | string | Wordswhere it happened |
| done* | boolean | true: this event has happened |
Method methods[] · 3 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe value posted |
| label* | string | Words"Postal label" |
| text | string | Wordswho pays, where to go, as the merchant set it |
Submit submit · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"Request the return" |
| action* | string | Actionthe mutation the request is posted to |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| footnote | string | Wordsa last line: what is not returnable, a contact |
| policyLink | PolicyLink | the full text of the policy |
| photos | boolean | let the customer attach pictures of the item |
| error | string | Wordswhat went wrong when the request was refused |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
PolicyLink options.policyLink · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| money | formats a price, given in cents |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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:
submit,options.policyLink - Reads
ordersfrom your app
A storefront section, for account, returns 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
- Restock notice email form: a sold-out category: the merchant’s restocks and an email field to be told.
- Restock notify card: a sold-out product on its own: its picture, its state, one field and the shop’s promise about the address.
- Restock notify inline row: a product page or a sold-out list: one compact row per sold-out variant with its own field and bell button.
- Retired products rows: products no longer made with their years, quantity and reason: an honest page about what was stopped.
- Returning order review bag first: a signed-in customer: the bag first, saved address and card as rows, and who is signed in at the top.
- Review form card: one form card with the product named on top: under the reviews of a product page, or on a page of its own.
- Review form page: the product large on one side and the form beside it: the page a post-purchase email leads to.
- Review form steps: numbered steps down a rail, stars first, then the words, the photos and the name: a longer form with criteria and photos that should feel short.