Preorder timeline steps — Storefront block
Prostorefront-preorder-timeline-steps · for product, home, catalog pages
Preorder timeline steps
When the payment plan is the doubt (a deposit, a balance at shipping): the product small above, each step of the order drawn with its date and amount
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-preorder-timeline-stepsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontPreorderTimelineSteps from '@/components/trame/blocks/storefront/storefront-preorder-timeline-steps.vue'
const props = {
product: {
id: "veste-brume",
name: "Mist windbreaker jacket",
price: 24900,
image: "https://images.unsplash.com/photo-1591047139829-d91aecb6caea?w=1600&q=80",
alt: "An orange windbreaker on a hanger",
summary: "Lightweight nylon, ribbed collar and cuffs, two zip pockets. A single color for this first run."
},
title: "Preorder the Mist jacket",
expectedDate: "Ships from November 18",
payNow: 5000,
laterLabel: "The $199 balance is charged the day it ships, not before.",
made: 300,
schedule: [
{
id: "order",
label: "You preorder",
date: "Today",
amount: 5000,
note: "A deposit, charged right away."
},
{
id: "make",
label: "The workshop cuts and sews the run",
date: "October and early November"
}
],
action: "preorder.place",
actionLabel: "Preorder for $50",
policy: "Cancel free of charge, with your deposit refunded, until the day it ships.",
options: {
eyebrow: "Preorder",
nowLabel: "Today",
madeLabel: "{count} made for this run"
}
}
</script>
<template>
<StorefrontPreorderTimelineSteps v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| product* | Product | Datathe product open to pre-order; its price is the full price, in cents |
| title | string | Wordsthe heading ("Preorder the Brume jacket"); the product’s name when absent |
| expectedDate* | string | Wordswhen it ships, in the merchant’s own words ("Shipping from 18 November"): never computed |
| payNow* | number | Datawhat the customer pays today, in cents; the full price when the merchant charges everything now |
| laterLabel | string | Wordswhen and how the rest is charged ("The balance is charged on the day of shipping"); absent when everything is paid now |
| made | number | Datahow many were made, only when the merchant says so |
| schedule | Schedule[] | Datathe steps from the order to the delivery, in order, as the merchant plans them |
| action* | string | Actionthe page action that places the pre-order (posted as a form) |
| actionLabel | string | Wordswhat the button says ("Preorder") |
| policy | string | Wordsthe merchant’s terms ("Free cancellation until shipping") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Product product · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe product’s name |
| price* | number | an amount in cents |
| compareAt | number | the price before the merchant’s reduction |
| image | string | null | Picturethe main picture; null or absent: the product has none yet |
| alt | string | Wordswhat the main picture shows |
| summary | string | Wordsone short line on the product |
Schedule schedule[] · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | the schedule’s id |
| label* | string | Wordswhat happens ("Your card is charged the deposit") |
| date | string | Wordswhen, as the merchant wrote it ("Today", "Mid-October") |
| amount | number | what is charged at this step, if any |
| note | string | Wordsa short note on the schedule |
Options options · 4 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsthe tag ("Preorder") |
| nowLabel | string | Wordsthe name of the payment made today ("Today") |
| madeLabel | string | Wordshow the number made is said, {count} standing for it ("{count} copies made") |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| 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 |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
action - Reads
productsfrom your app
A storefront section, for product, home, catalog pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More storefront blocks
- Points rewards affordable first: The customer has points to spend: the rewards to redeem, those they can afford first, the balance always in view.
- Preorder banner: a pre-order announced between two sections or above a product page: the picture, the date, what is paid now, one button.
- Preorder product split: the pre-order is the page’s subject: a large picture beside the date, the two payments side by side and the terms.
- Preorder products cards: a ship window, a reserved-of-total meter and a reserve button: a limited run in preorder; the merchant’s own products and figures only.
- Price breakdown ruled bars: a ruled ledger, each line with its amount and a thin bar of its weight: the honest account of one price.
- Price breakdown stacked bar: one segmented bar and its legend: 3 to 6 lines read at a glance.
- Price routes two ledgers: two short ledgers, the usual route against selling direct, ending in two totals: a brand selling direct.
- Price story figures: a short account, three or four key figures and a closing sentence, no ledger: reasons that are not only cost.