Price story figures — Storefront block
Prostorefront-price-story-figures · for product, home, landing, story pages
Price story figures
A short account, three or four key figures and a closing sentence, no ledger: reasons that are not only cost
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-price-story-figuresUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontPriceStoryFigures from '@/components/trame/blocks/storefront/storefront-price-story-figures.vue'
const props = {
eyebrow: "Transparence",
title: "Why this bag costs $89",
lead: "Every dollar, from the leather to our margin. The figures are from the latest production run.",
total: 8900,
compare: {
title: "At a retailer",
total: 17800,
lines: [
{
label: "Making",
amount: 5500
},
{
label: "Distribution and shipping",
amount: 3300
}
]
},
stats: [
{
value: "4 h",
caption: "of workshop labor per bag"
},
{
value: "$14",
caption: "an hour, benefits included, paid to the workshop"
}
],
closing: "If a figure looks wrong to you, write to us: we answer.",
footnote: "March run; all prices include tax."
}
</script>
<template>
<StorefrontPriceStoryFigures v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat this is ("Transparency") |
| title* | string | Wordsthe section’s title ("Why this bag costs €89") |
| lead | string | Wordsone or two sentences under the title: the short account |
| total* | number | Datathe price the lines explain, in cents, as the merchant set it |
| compare | Compare | the other route to compare with, e.g. "At a reseller" |
| stats* | Stat[] | the stats shown, in order |
| closing | string | Wordsa closing sentence, as the merchant wrote it |
| footnote | string | Wordswhere the figures come from and their date |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Compare compare · 3 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the other route is ("At a reseller") |
| total* | number | Dataits price in cents, from the merchant’s own sourced figures |
| lines* | Line[] | the other route’s cost lines |
Line compare.lines[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhere the money goes ("Raw materials") |
| amount* | number | Datathe merchant’s own amount for this line, in cents |
| note | string | Wordsone line saying what it covers |
Stat stats[] · 2 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsthe figure as the merchant writes it ("€14 / h") |
| caption* | string | Wordswhat it measures |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| showBars | boolean | false: hides the bars beside the figures |
| 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 |
|---|---|
| label | your word for an interface key, or undefined to keep the block’s own |
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
A storefront section, for product, home, landing, story pages; it uses clsx, motion, tailwind-merge.
More storefront blocks
- 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.
- 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.
- Product close ups film: tall close-ups in a row that scrolls sideways, each name over its foot, the piece leading the row as its first card: a product page band that shows the making quality without a long read.
- Product close ups index: a numbered list of the details beside one large close-up that changes as a detail is chosen, the piece’s card under the list: a few details with real explanations, read one at a time.
- Product close ups loupes: each detail in a round close-up like a magnifying glass, set in staggered balanced rows with its name and note under it, the piece itself in a card at the head: three to twelve details of a crafted piece (leather, knitwear, ceramics).
- Product compare cards above: product cards over a grouped table whose header stays in view: a large range with many attributes.