Band ledger — Stats block

Pro

stats-band-ledger · for home, landing, about pages

Band ledger

A report of figures grouped by topic with a footnote: impact, sourcing, or more than six figures; 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-ledger

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StatsBandLedger from '@/components/trame/blocks/stats/stats-band-ledger.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>
<StatsBandLedger v-bind="props" />
</template>

Props

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

PropTypeDescription
headingstringWordswhat these figures say, in a few words
leadstringWordsone sentence of context
itemsItem[]the items shown, in order
groupsGroup[]ledger and period-tabs: figures grouped by topic or by period; periods newest first, since period-tabs opens on the first group
sourcestringWordsthe footnote: source, period and method ("Figures at 31 December 2025, from our orders")
sourceHrefstringActionwhere the source or the report is read
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 6 props
PropTypeDescription
value*stringWordsthe figure exactly as the merchant writes it ("12,400", "€1.2M", "4.8/5"), with its unit
label*stringWordswhat it counts ("orders delivered"), with its period if it has one ("since 2019")
notestringWordsa 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
trendstringWordsa change the merchant measured ("+8% over a year"), only with a real series behind it
seriesnumber[]the merchant’s own values over time, drawn as a small line (cards)
Group groups[] · 2 props
PropTypeDescription
title*stringWordsthe topic ("Delivery", "Materials")
items*Item[]the group’s items, in order
Item groups[].items[] · 6 props
PropTypeDescription
value*stringWordsthe figure exactly as the merchant writes it ("12,400", "€1.2M", "4.8/5"), with its unit
label*stringWordswhat it counts ("orders delivered"), with its period if it has one ("since 2019")
notestringWordsa 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
trendstringWordsa change the merchant measured ("+8% over a year"), only with a real series behind it
seriesnumber[]the merchant’s own values over time, drawn as a small line (cards)
Options options · 2 props
PropTypeDescription
countbooleanlet 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' | 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
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: sourceHref

A stats section, for home, landing, about pages; it uses 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.

All 20 stats blocks