Made to order offer ledger — Storefront block

Pro

storefront-made-to-order-offer-ledger · for product pages

Made to order offer ledger

A product made after the order: when it is made and shipped, the queue, and a button that says when it is charged

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-made-to-order-offer-ledger

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontMadeToOrderOfferLedger from '@/components/trame/blocks/storefront/storefront-made-to-order-offer-ledger.vue'

const props = {
title: "Made for you",
product: {
id: "table",
name: "Oak table",
price: 89000
},
facts: [
{
label: "Production",
value: "In the workshop, after you order"
},
{
label: "Shipping",
value: "Week of November 2"
}
],
reassurance: "Charged when it ships, not before.",
action: {
label: "Join the queue",
action: "add-to-cart"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordswhat the buyer chooses ("How to receive it")
introstringWordsone sentence on the choice
productProductthe product: its price is the one the button states when the mode has none
modesMode[]Datathe purchase modes of the product, as the shop sells them
facts*Fact[]the facts shown, in order
reassurancestringWordsa real policy line ("Cancel anytime from your account")
action*Actionthe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Product product · 4 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe product’s name
price*numberan amount in cents
currencystringDesignISO 4217, EUR by default
Mode modes[] · 5 props
PropTypeDescription
id*stringthe mode’s id
label*stringthe mode ("One-time purchase", "Every 4 weeks", "Home delivery")
pricenumberthe price in this mode, in cents
periodstringwhat the price covers ("/ 4 weeks")
notestringone line on the mode ("Cancel anytime"), the merchant’s own
Fact facts[] · 2 props
PropTypeDescription
label*stringWords("Made")
value*stringWords("After your order, in the workshop")
Action action · 3 props
PropTypeDescription
label*stringWordswhat the button says before the amount ("Subscribe", "Add the bundle to the cart")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens; the chosen mode or store id is added
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
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
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: action
  • Reads products from your app

A storefront section, for product pages; it uses 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

  • Lookbook cover wide cover: a wide cover picture under the title and two buttons, a strip of credits below: the opening of a season’s lookbook.
  • Lookbook cover: the first frame as a wide magazine cover with the title and the link on its foot, the other frames as a numbered contact sheet with their captions and notes: a full shoot with one picture strong enough to open it.
  • Lookbook pinboard: taped prints slightly rotated on a board that straighten under the pointer, with their caption and note: a casual, handmade lookbook or team picks.
  • Loyalty points overview: The balance, where the customer stands on the merchant’s tiers and what the next one unlocks, and the latest movements.
  • Material shelf detail split: the list on one side, the chosen material large on the other: three to six materials with long copy.
  • Material shelf glossary link: each material a row leading to its own entry page: a shop with an ingredients library.
  • Material shelf grid: three or four columns, a round photo, the name and one line each: a brand page that lists its materials.
  • Material shelf rail: a row of photo cards that scrolls without shifting the page: six to twelve materials on a home page.

All 409 storefront blocks