Split — Dashboard block
Freedashboard-split · for app, home pages
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
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-splitUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import DashboardSplit from '@/components/trame/blocks/dashboard/dashboard-split.vue'
const props = {
title: "Good morning, Priya",
intro: "Kitebase this week: traffic, revenue and what needs a look.",
period: "October 2 – 8",
actions: [
{
label: "Create an API key",
action: "key.create"
},
{
label: "Invite a teammate",
action: "member.invite"
}
],
figures: [
{
label: "Monthly recurring revenue",
value: 18420000,
format: "money",
delta: 6.2,
deltaTone: "success",
deltaLabel: "vs. previous week",
series: [
158,
163
],
open: "report.revenue"
},
{
label: "Inference calls",
value: 8940000,
format: "number",
delta: 12.8,
deltaTone: "success",
deltaLabel: "vs. previous week",
series: [
1.08,
1.12
],
open: "report.usage"
}
],
chart: {
title: "Inference calls by day",
subtitle: "All regions, all models",
kind: "bars",
format: "number",
seriesLabel: "Calls",
open: "report.usage",
points: [
{
x: "Mon",
y: 1080000
},
{
x: "Tue",
y: 1120000
}
]
},
lists: [
{
id: "todo",
title: "Needs a look today",
role: "attention",
total: 6,
open: "alert.show",
more: "alert.list",
items: [
{
id: "i-311",
title: "Latency above 800 ms on eu-west",
detail: "GPU pool at 92% for 14 minutes",
meta: "Now",
badge: {
label: "Incident",
tone: "danger"
}
},
{
id: "b-2207",
title: "Card declined: Harbor Analytics",
detail: "Scale plan · second attempt tomorrow",
meta: "Today",
badge: {
label: "Billing",
tone: "warning"
}
}
]
},
{
id: "latest",
title: "New workspaces",
role: "recent",
total: 1386,
open: "workspace.show",
more: "workspace.list",
items: [
{
id: "w-1386",
title: "Tidewater Robotics",
detail: "Scale plan · 14 seats",
meta: "$1,200.00",
badge: {
label: "Paid",
tone: "success"
}
},
{
id: "w-1385",
title: "Lantern Health Labs",
detail: "Team plan · 6 seats",
meta: "$390.00",
badge: {
label: "Paid",
tone: "success"
}
}
]
}
],
options: {
currency: "USD",
mood: "inverse"
}
}
</script>
<template>
<DashboardSplit v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe app’s home, as it greets its user ("Hello Camille") |
| intro | string | Wordsone line under the title ("Here is where the workshop stands") |
| period | string | Wordsthe period the figures and the chart cover, as the host wrote it ("1 to 7 October") |
| actions | Action[] | frequent creations offered as buttons, e.g. "New order" |
| figures | Figure[] | the key figures, up to twelve |
| chart | Chart | a chart of one figure over time |
| lists | List[] | short lists of records to act on |
| loading | boolean | the figures and lists are being fetched: placeholders in the layout’s shape, the header and its actions still usable |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Action actions[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe frequent creation ("New order") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
Figure figures[] · 11 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the figure counts ("Paid orders") |
| value* | number | null | Datathe figure as the server counted it: cents for money, null when unknown |
| format | 'number' | 'money' | 'percent' | how the figure reads: a number, money (cents) or a percent |
| unit | string | Wordsthe unit written after a number ("orders") |
| period | string | Wordsthe period this figure covers, if it differs from the dashboard’s ("Today") |
| delta | number | Datathe change the server gives, in percent and signed (+12.4, -3): never computed by the block |
| deltaTone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | how the server reads that change: a rise in returns is not good news |
| deltaLabel | string | Wordswhat the change compares to ("vs previous week") |
| series | number[] | Datathe last points of the figure, oldest first, to draw its small line |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the state the host reads in the figure |
| open | string | Actionwhere the figure leads: the records behind it |
Chart chart · 8 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the chart shows ("Revenue per day") |
| subtitle | string | Wordsthe period or the unit, one line |
| kind* | 'bars' | 'line' | bars: separate periods; line: a continuous trend |
| format | 'number' | 'money' | 'percent' | how the values read: a number, money (cents) or a percent |
| seriesLabel | string | Wordswhat the values are ("Sales") |
| points* | Point[] | Datathe values by period, oldest first; cents when money |
| reading | string | Wordsone sentence reading the chart, written by the merchant or the host: the block never writes it |
| open | string | Actionthe full report |
Point chart.points[] · 2 props
| Prop | Type | Description |
|---|---|---|
| x* | string | the point’s label on the axis, e.g. a day |
| y* | number | null | the value at this point; null when unknown |
List lists[] · 8 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe list’s key |
| title* | string | Wordswhat the list holds ("To handle", "Latest orders") |
| role | 'attention' | 'recent' | attention: what needs an answer now; recent (the default): the latest records |
| total | number | Datahow many records there are in all, counted by the server |
| items* | Item[] | Dataa few rows: id, title, a detail line, a trailing meta (date, amount) and a badge with the host’s tone |
| open | string | Actionwhat a row runs, with the item as record |
| more | string | Action"See all": the full list |
| empty | string | Wordswhat the list says when it is empty ("Nothing to handle today") |
Item lists[].items[] · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the item’s id |
| title* | string | the item’s title |
| detail | string | a second line under the title |
| meta | string | a short fact at the end of the row, e.g. a date |
| badge | Badge | a status badge on the item |
Badge lists[].items[].badge · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | the badge’s name, as shown |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| currency | string | DesignISO 4217 for money figures, euro by default |
| empty | string | Wordswhat the page says when it has nothing to show |
| 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 |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
actions[],figures[].open,chart.open,lists[].open,lists[].more - Reads
figures,listsfrom your app
A dashboard section, for app, home pages; it uses @lucide/vue, @vueuse/core, clsx, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More dashboard blocks
- 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.
- Report breakdown: The merchant’s own breakdown table leads beside a written reading, with charts as supporting evidence below.
- Report comparison: The merchant’s own current and previous figures are compared in a ledger above two aligned charts.
- Report summary: A document-like overview of the merchant’s own period figures, followed by charts and the detailed breakdown.
- 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.