Report breakdown — Dashboard block
Prodashboard-report-breakdown · for app, analytics pages
Report breakdown
The merchant’s own breakdown table leads beside a written reading, with charts as supporting evidence below.
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/dashboard-report-breakdownUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import DashboardReportBreakdown from '@/components/trame/blocks/dashboard/dashboard-report-breakdown.vue'
const props = {
title: "Activity report",
intro: "Sales collected and paid orders, across all channels.",
periods: [
{
id: "october",
label: "October 2026",
comparisonLabel: "September 2026",
reading: "Online orders are the main source of sales. The breakdown by channel helps plan the next restocks.",
figures: [
{
label: "Sales collected",
value: 1248000,
previous: 1154500,
format: "money",
change: "+8.1%"
},
{
label: "Paid orders",
value: 184,
previous: 168,
change: "+9.5%"
}
],
charts: [
{
title: "Payments collected through the month",
label: "October",
previousLabel: "September",
format: "money",
points: [
{
x: "Week 1",
y: 281000,
previous: 264000
},
{
x: "Week 2",
y: 312000,
previous: 286000
}
]
},
{
title: "Orders per week",
label: "October",
previousLabel: "September",
points: [
{
x: "Week 1",
y: 42,
previous: 38
},
{
x: "Week 2",
y: 45,
previous: 43
}
]
}
],
rows: [
{
canal: "Online shop",
orders: 112,
revenue: 756000,
share: 60.6
},
{
canal: "Markets",
orders: 48,
revenue: 312000,
share: 25
}
]
},
{
id: "september",
label: "September 2026",
figures: [
{
label: "Sales collected",
value: 1154500,
format: "money"
},
{
label: "Paid orders",
value: 168
}
],
charts: [
{
title: "Payments collected through the month",
label: "September",
format: "money",
points: [
{
x: "Week 1",
y: 264000
},
{
x: "Week 2",
y: 286000
}
]
},
{
title: "Orders per week",
label: "September",
points: [
{
x: "Week 1",
y: 38
},
{
x: "Week 2",
y: 43
}
]
}
],
rows: [
{
canal: "Online shop",
orders: 100,
revenue: 682000,
share: 59.1
},
{
canal: "Markets",
orders: 46,
revenue: 298500,
share: 25.9
}
]
}
],
columns: [
{
key: "canal",
label: "Channel"
},
{
key: "orders",
label: "Orders",
format: "number"
}
],
options: {
eyebrow: "Monthly review",
breakdownTitle: "Breakdown by channel",
source: "Demo data. Amounts include tax, after refunds. Weeks are grouped into their accounting month."
}
}
</script>
<template>
<DashboardReportBreakdown v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe report’s subject |
| intro | string | Wordsthe scope and purpose of this report |
| periods* | Period[] | the periods the report covers, each with its figures and charts |
| columns* | Column[] | the columns shown, in order |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Period periods[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designa unique period key |
| label* | string | Wordsthe full period label |
| comparisonLabel | string | Wordsthe comparison period, when provided |
| reading | string | Wordsthe merchant’s own interpretation of this period, never generated by the block |
| figures* | Figure[] | Datathe merchant’s own figures for this period |
| charts* | Chart[] | the period’s charts |
| rows* | Record<string, unknown>[] | Datathe breakdown records keyed by columns |
Figure periods[].figures[] · 5 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat this figure measures |
| value* | number | null | the figure; null when unknown |
| previous | number | null | the figure in the previous period; null when unknown |
| change | string | Wordsthe signed change supplied by the host, including its unit |
| format | 'number' | 'money' | 'percent' | how the figure reads |
Chart periods[].charts[] · 5 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe chart’s subject |
| label* | string | Wordsthe name of the main series |
| previousLabel | string | Wordsthe name of the optional comparison series |
| format | 'number' | 'money' | 'percent' | how the chart’s values read |
| points* | Point[] | Datathe chart’s points, in order |
Point periods[].charts[].points[] · 3 props
| Prop | Type | Description |
|---|---|---|
| x* | string | Wordsthe category or date |
| y* | number | null | the value at this point; null when unknown |
| previous | number | null | the value at this point in the previous period; null when unknown |
Column columns[] · 3 props
| Prop | Type | Description |
|---|---|---|
| key* | string | Designa key in a breakdown row |
| label* | string | Wordsthe column heading |
| format | 'number' | 'money' | 'percent' | how the column’s values read |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsthe report’s document label |
| breakdownTitle | string | Wordsthe breakdown heading |
| source | string | Wordsthe source and methodology, supplied by the host |
| currency | string | DesignISO 4217 currency code |
| 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 |
| money | formats a price, given in cents |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Reads
reports,rowsfrom your app
A dashboard section, for app, analytics pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More dashboard blocks
- Metric tabs: one big chart for several measures: the chart and every figure with its own points become selectable tiles over a single plot, the other figures a quiet strip and the lists two columns under it.
- Overview: an app’s home read from the top: the figures, then the chart, then the lists side by side.
- Project card member: A person-led summary with counters and contact entry, using the merchant's own records only.
- Project card mini: A compact title, progress and figure for a dashboard, using the merchant's own records only.
- Project card: A project summary with figure, progress and team, using the merchant's own records only.
- Resource quota rings: a plan overview: each resource a small card whose ring shows the share used, for a few quotas read at a glance.
- Resource quota tiles: metered resources (storage, seats, calls) read against what the plan allows.
- Split: a daily tool with a lot to scan: figures and chart in the main column, what needs attention and the quick actions in a side rail.