Impact ledger commitments timeline — Stats block
Prostats-impact-ledger-commitments-timeline · for about, home, landing pages
Impact ledger commitments timeline
Dated promises with the merchant’s own status on each: commitments kept, ongoing or late
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-impact-ledger-commitments-timelineUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StatsImpactLedgerCommitmentsTimeline from '@/components/trame/blocks/stats/stats-impact-ledger-commitments-timeline.vue'
const props = {
heading: "Our impact, figure by figure",
lead: "What we measure, how, and what we haven’t reached yet.",
groups: [
{
title: "Shipping",
rows: [
{
label: "CO₂ emissions per parcel shipped",
value: "1.9 kg in 2025",
note: "Calculated from our carrier’s records, excluding returns."
},
{
label: "Parcels delivered by cargo bike",
value: "38% in 2025"
}
]
},
{
title: "Repairs",
rows: [
{
label: "Pieces repaired in the workshop",
value: "240 in 2025"
},
{
label: "Average repair time",
value: "9 days",
note: "From drop-off to shipping, across 2025."
}
]
}
],
method: "Period: calendar year 2025. Scope: the Portland workshop and shipments within the US.",
reportHref: "about",
shares: [
{
label: "Put back on sale as is",
percent: 54,
text: "Checked in the workshop, then back on the shelf labeled “second life.”"
},
{
label: "Repaired, then resold",
percent: 31,
text: "A seam, a strap or a lining redone."
}
],
rules: [
{
title: "One repaired piece",
text: "Counts once, when shipped, even if it needed two repairs."
},
{
title: "One cargo-bike parcel",
text: "Counts when the whole delivery is made by bike, not just the last mile."
}
]
}
</script>
<template>
<StatsImpactLedgerCommitmentsTimeline v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| heading | string | Wordswhat is reported ("Our impact, in verifiable figures") |
| lead | string | Wordsone sentence of context |
| groups | Group[] | the groups shown, in order |
| shares | Share[] | breakdown-bar: the parts of one whole |
| rules | Rule[] | rules-grid: how the figures are counted |
| method | string | Wordsthe footnote: period, scope and method of the figures, as the merchant states them (the block adds no "certified" or "audited") |
| reportHref | string | Actionwhere the full report is read |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Group groups[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsthe topic ("Transport", "Materials") |
| rows* | Row[] | the group’s rows, in order |
Row groups[].rows[] · 6 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat is measured or promised ("CO₂ emissions per parcel") |
| value* | string | Wordsthe figure exactly as the merchant writes it, with its unit and period ("1.9 kg in 2024") |
| date | string | Wordscommitments-timeline: when it was promised or reached, as written ("by 2027") |
| status | string | Wordswhere it stands, in the merchant’s own word ("Held", "In progress", "Late") |
| tone | 'done' | 'ongoing' | 'late' | the colour of the status: only what the merchant states |
| note | string | Wordshow it was measured, or a precision: the method belongs here |
Share shares[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsone part of the whole ("Repaired and resold") |
| percent* | number | Datathe merchant’s own share, in percent |
| text | string | Wordswhat this part means |
Rule rules[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsone counting rule ("What counts as repaired") |
| text* | string | Wordsthe rule, as the merchant applies it |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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:
reportHref
A stats section, for about, home, landing pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, motion, reka-ui, 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.
- Listening figures bars: Published figures and ranked shares with a required measurement period; the merchant’s own only.
- Metric cards spotlight: one figure that matters more than the others, set very large on a tinted panel, the rest as ruled rows beside it and the series as labelled bars under them: when the first figure carries the story; the merchant’s own only.
- Metric cards: each figure on its own card with its precision, its change and a small line of its series; the merchant’s own only.