Price story figures — Storefront block

Pro

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

Usage

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.

PropTypeDescription
eyebrowstringWordswhat this is ("Transparency")
title*stringWordsthe section’s title ("Why this bag costs €89")
leadstringWordsone or two sentences under the title: the short account
total*numberDatathe price the lines explain, in cents, as the merchant set it
compareComparethe other route to compare with, e.g. "At a reseller"
stats*Stat[]the stats shown, in order
closingstringWordsa closing sentence, as the merchant wrote it
footnotestringWordswhere the figures come from and their date
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Compare compare · 3 props
PropTypeDescription
title*stringWordswhat the other route is ("At a reseller")
total*numberDataits price in cents, from the merchant’s own sourced figures
lines*Line[]the other route’s cost lines
Line compare.lines[] · 3 props
PropTypeDescription
label*stringWordswhere the money goes ("Raw materials")
amount*numberDatathe merchant’s own amount for this line, in cents
notestringWordsone line saying what it covers
Stat stats[] · 2 props
PropTypeDescription
value*stringWordsthe figure as the merchant writes it ("€14 / h")
caption*stringWordswhat it measures
Options options · 2 props
PropTypeDescription
showBarsbooleanfalse: hides the bars beside the figures
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
labelyour 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.

All 409 storefront blocks