Band milestones — Stats block
Prostats-band-milestones · for home, landing, about pages
Band milestones
Figures along a rule, one dot each, in the order given: a path of firsts, years and counts rather than a table; the merchant’s own only
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/stats-band-milestonesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StatsBandMilestones from '@/components/trame/blocks/stats/stats-band-milestones.vue'
const props = {
heading: "The shop in numbers",
lead: "Figures kept up to date by the team, each with its period.",
items: [
{
value: "12,400",
label: "orders delivered since 2019",
icon: "package"
},
{
value: "4.8/5",
label: "average customer review rating",
note: "from 312 published reviews",
icon: "star"
}
],
source: "Figures as of December 31, 2025, based on our orders and the reviews published on the shop.",
sourceHref: "about",
options: {
count: true
}
}
</script>
<template>
<StatsBandMilestones v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| heading | string | Wordswhat these figures say, in a few words |
| lead | string | Wordsone sentence of context |
| items | Item[] | the items shown, in order |
| groups | Group[] | ledger and period-tabs: figures grouped by topic or by period; periods newest first, since period-tabs opens on the first group |
| source | string | Wordsthe footnote: source, period and method ("Figures at 31 December 2025, from our orders") |
| sourceHref | string | Actionwhere the source or the report is read |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Item items[] · 6 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsthe figure exactly as the merchant writes it ("12,400", "€1.2M", "4.8/5"), with its unit |
| label* | string | Wordswhat it counts ("orders delivered"), with its period if it has one ("since 2019") |
| note | string | Wordsa precision under the label ("returns excluded"): never a claim the merchant did not make |
| icon | 'users' | 'package' | 'calendar' | 'star' | 'heart' | 'leaf' | 'truck' | 'map-pin' | 'award' | 'recycle' | 'clock' | 'shield-check' | the icon shown with it, from the block’s set |
| trend | string | Wordsa change the merchant measured ("+8% over a year"), only with a real series behind it |
| series | number[] | the merchant’s own values over time, drawn as a small line (cards) |
Group groups[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe topic ("Delivery", "Materials") |
| items* | Item[] | the group’s items, in order |
Item groups[].items[] · 6 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsthe figure exactly as the merchant writes it ("12,400", "€1.2M", "4.8/5"), with its unit |
| label* | string | Wordswhat it counts ("orders delivered"), with its period if it has one ("since 2019") |
| note | string | Wordsa precision under the label ("returns excluded"): never a claim the merchant did not make |
| icon | 'users' | 'package' | 'calendar' | 'star' | 'heart' | 'leaf' | 'truck' | 'map-pin' | 'award' | 'recycle' | 'clock' | 'shield-check' | the icon shown with it, from the block’s set |
| trend | string | Wordsa change the merchant measured ("+8% over a year"), only with a real series behind it |
| series | number[] | the merchant’s own values over time, drawn as a small line (cards) |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| count | boolean | let each figure count up to its given value once, when it comes into view (never to another value; on by default, false keeps every figure still) |
| 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 |
| Link | your router’s link component |
| 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:
sourceHref
A stats section, for home, landing, about pages; it uses @vueuse/core, clsx, motion, tailwind-merge.
More stats blocks
- Benchmarks before after bars: Paired measurements with a common scale and explicit labels; the merchant’s own only.
- Benchmarks funnel: Ordered step values with a reference marker, without inferred conversion rates; the merchant’s own only.
- Benchmarks table: A compact comparison table with the current column highlighted; the merchant’s own only.
- Benchmarks trend: Two measured series plotted in order with a full data table; the merchant’s own only.
- Brand figures facts band: the story centred above a full-width band of large facts, the values as a line under it: when the figures are the proof.
- Impact ledger breakdown bar: one stacked bar of shares with a legend and an explanation per share: what happens to returns, where the money goes.
- Impact ledger commitments timeline: dated promises with the merchant’s own status on each: commitments kept, ongoing or late.
- Impact ledger rules grid: numbered cards saying how the figures are counted: gives credibility to the numbers above it.