Dashboard
Billing home: four KPIs that drive the revenue chart, Needs attention, overdue invoices, a Revenue tab of analysis charts, and an Ask panel.
Install
Not exported from agentic-ds-kit. add copies the source into your app (components/patterns/dashboard/) with this contract beside it, and the app-shell example it renders into components/patterns/app-shell/ (kept if you already have it). You own the copies: replace the demo data in dashboard-data.ts, pass your nav through shell, drop the cards you don't need, and keep the must lines.
Also copies app-shell beside it, which this pattern builds on (kept if you already have it).
Usage
What a copy keeps
The contract’s must lines: the kit look and accessibility. Ask before breaking one.
- Use kit components from agentic-ds-kit for anything the kit has; no local cousins (tables, dialogs, rows, rules, charts, sparklines, metric tiles)
- Semantic tokens only (agentic-ds-kit/tokens.css); no raw hex, no primitive --color-* ramps
- Chart series take the chart palette (--chart-1 to --chart-6, set by the charts); status colours only where they mean something (overdue, a failed payment, a bad delta)
- Every number uses tabular figures (the page root sets font-variant-numeric: tabular-nums)
- Exactly one appearance="solid" mode="primary" Button per view: New invoice in the header. Export and every card action are outline
- Do not restyle kit components; change them through their props, slots, and tokens
- Render inside a main landmark; nav stays reachable on small screens (the app shell's Drawer) and the work panel opens as its right Drawer when narrow
Defaults you can change
- Shell: the app-shell example (DASHBOARD_DEMO_SHELL): layout inset, layout-shell--viewport, no top bar when wide; Northwind workspace switcher, Quick actions (⌘K), Notifications, Home / Customers / Billing (Invoices, Payments, Plans) / Reports and the account menu; the work panel titled Assistant with Tabs Ask (Chat embedded: no header of its own, fills the panel) and What changed, closed
- Header: PageHeader Billing with the sync line as subtitle, Export (outline), New invoice (solid primary) and the panel toggle; Tabs Overview and Revenue
- Overview source order: Needs attention, KPIs, overdue invoices, revenue chart. Wide, the grid shows KPIs on top, the chart with the rail (--layout-rail) beside it, then the invoices full width; narrow, one column in source order
- KPIs: Scoreboard selectable with four framed Scorecards, each with a delta (arrow and colour) and what it compares to; size sm and no comparison line on a phone, where they go two by two
- Revenue chart: a Card with the eyebrow Revenue · metric · granularity, the sync time, a title that states the finding, a LineChart area with the metric's reference line (280 tall wide, 120 narrow), the source line, Ask and Open revenue report (outline, opens the Revenue tab)
- Needs attention: a flush Card titled with how many accounts need a person, ListView rows with an icon, the reason in words and the amount as the row value, grouped Failed payments and Cards expiring; on a phone the expiring cards fold into one row. Ask and Retry 3 payments (outline) in the footer
- Overdue invoices: a flush Card titled with the count and total, a Table (stack) oldest first with Customer, Invoice, an Overdue Badge with its icon, Due with days late (sortable) and Amount, a row menu, the source line, Ask and View all (outline)
- Cards use Card size md wide and sm narrow
- Revenue tab: the period DateRangePicker (sm, in a Field labelled Period at the start) with the presets Last 30 days, Last 3 months and Last 12 months, or a custom range of days; granularity SegmentedControl; Compare to previous period Switch; the InsightCard summary; MRR movements (ComboChart stacked, net line); Revenue by plan as a short percent stack (height 160); then a row of two in layout-split: Retention by signup month (Heatmap) and Top plans (BarList in a Card)
Built from
Related
- Component
Line
Change and progress over ordered samples as a line or area chart.
- Component
Scoreboard
Metrics strip of kit Scorecards: two to six figures, and the only metric picker.
- Component
RunningNow
Many agents, small: a strip of what runs now for a header (row of chips) or a sidebar (stack), with status, activity and a clock.
- Component
AgentMonitor
One agent at work: a live clock and running cost lead; finished steps sit in a time strip you can open.