Return request stepped — Storefront block

Pro

storefront-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-stepped

Usage

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.

PropTypeDescription
title*stringWordswhat the page does ("Return an item")
leadstringWordsone 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
reasonsstring[]Wordsa reason a customer can pick ("Too small")
methodsMethod[]the ways to send the items back, e.g. "Prepaid postal label"
submit*Submitthe submit action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Order orders[] · 9 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[]the order’s lines, each with its product and unit price
totals*Totalsthe order’s amounts
shippingAddressShippingAddresswhere it is delivered
trackingTrackingthe carrier’s tracking, once shipped
Line orders[].lines[] · 8 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
product*Productthe product on the line
variantstringWordsthe chosen options, written out ("Navy · 42")
unitPrice*numberan amount in cents
compareAtnumberan amount in cents
quantity*numberhow many, at least 1
maxQuantitynumberthe most the line may hold
notestringWordsa line note: a gift, a delivery delay
Product orders[].lines[].product · 4 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe product’s name
imagestring | nullPicturethe main picture; null or absent: the product has none yet
altstringWordswhat the main picture shows
Totals orders[].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 orders[].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 orders[].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 orders[].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
Method methods[] · 3 props
PropTypeDescription
id*stringDesignthe value posted
label*stringWords"Postal label"
textstringWordswho pays, where to go, as the merchant set it
Submit submit · 2 props
PropTypeDescription
label*stringWords"Request the return"
action*stringActionthe mutation the request is posted to
Options options · 5 props
PropTypeDescription
footnotestringWordsa last line: what is not returnable, a contact
policyLinkPolicyLinkthe full text of the policy
photosbooleanlet the customer attach pictures of the item
errorstringWordswhat went wrong when the request was refused
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
PolicyLink options.policyLink · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan 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).

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: submit, options.policyLink
  • Reads orders from 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.

All 409 storefront blocks