Report summary — Dashboard block

Pro

dashboard-report-summary · for app, analytics pages

Report summary

A document-like overview of the merchant’s own period figures, followed by charts and the detailed breakdown.

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-summary

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import DashboardReportSummary from '@/components/trame/blocks/dashboard/dashboard-report-summary.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>
<DashboardReportSummary v-bind="props" />
</template>

Props

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

PropTypeDescription
title*stringWordsthe report’s subject
introstringWordsthe 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
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Period periods[] · 7 props
PropTypeDescription
id*stringDesigna unique period key
label*stringWordsthe full period label
comparisonLabelstringWordsthe comparison period, when provided
readingstringWordsthe 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
PropTypeDescription
label*stringWordswhat this figure measures
value*number | nullthe figure; null when unknown
previousnumber | nullthe figure in the previous period; null when unknown
changestringWordsthe signed change supplied by the host, including its unit
format'number' | 'money' | 'percent'how the figure reads
Chart periods[].charts[] · 5 props
PropTypeDescription
title*stringWordsthe chart’s subject
label*stringWordsthe name of the main series
previousLabelstringWordsthe 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
PropTypeDescription
x*stringWordsthe category or date
y*number | nullthe value at this point; null when unknown
previousnumber | nullthe value at this point in the previous period; null when unknown
Column columns[] · 3 props
PropTypeDescription
key*stringDesigna key in a breakdown row
label*stringWordsthe column heading
format'number' | 'money' | 'percent'how the column’s values read
Options options · 5 props
PropTypeDescription
eyebrowstringWordsthe report’s document label
breakdownTitlestringWordsthe breakdown heading
sourcestringWordsthe source and methodology, supplied by the host
currencystringDesignISO 4217 currency code
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
moneyformats a price, given in cents
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
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Reads reports, rows from 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.

All 20 dashboard blocks