Skip to content
GitHub (opens in a new tab)

Scoreboard

A strip of two to six Scorecards, and the only metric picker.

stableOrganismcontracts/scoreboard.json

Preview

Scoreboard

A metrics strip of kit Scorecards: two to six figures, and the only metric picker. Up to six sit in one row; more wrap, and four or more go two by two on a phone. One KPI alone is Scorecard.

Master

Four Scorecards fill the strip. Preview the row, then two, three, four, and more.

RevenueLive$48.2k+12.4%vs last 30 days
Conversion30d3.6%+0.4%vs last 30 days
ChurnWatch1.2%-0.3%vs last 30 days
Active usersLive12.4k+4.1%vs last 30 days

Usage

Pass items with label, value, delta, trend, hint, and optional badge. Two to four cards share the row equally. Four stay four-up until the strip narrows, then go two by two. Five or six wrap three to a row, then two. Do not restyle the cards from here.

Do's

  • Showing two or more KPIs side by side at the top of a dashboard
  • Replacing ad-hoc flex rows of metric boxes
  • Picking which metric a chart shows — selectable
  • A quiet strip of three to five values with thin rules between them — appearance divided

Don'ts

  • A single KPI — render Scorecard directly
  • Vertical stacks of metrics — not supported by this contract
<Scoreboard
  items={[
    { label: "Revenue", value: "$48.2k", delta: "+12.4%", trend: "up", hint: "vs last 30 days", badge: "Live", badgeTone: "success" },
    { label: "Conversion", value: "3.6%", delta: "+0.4%", trend: "up", hint: "vs last 30 days", badge: "30d", badgeTone: "info" },
    { label: "Churn", value: "1.2%", delta: "-0.3%", trend: "down", hint: "vs last 30 days", badge: "Watch", badgeTone: "warning" },
    { label: "Active users", value: "12.4k", delta: "+4.1%", trend: "up", hint: "vs last 30 days", badge: "Live", badgeTone: "brand" },
  ]}
/>

Metrics strip of kit Scorecards: two to six figures, and the only metric picker. Up to six sit in one row; more wrap, and four or more go two by two when the strip is narrow. Framed cards or a divided strip; selectable turns it into a radiogroup that picks what a chart shows.

When to use

  • Showing two or more KPIs side by side at the top of a dashboard
  • Replacing ad-hoc flex rows of metric boxes
  • Picking which metric a chart shows — selectable
  • A quiet strip of three to five values with thin rules between them — appearance divided

When not to use

  • A single KPI — render Scorecard directly
  • Vertical stacks of metrics — not supported by this contract

What an agent reads

import { Scoreboard } from "agentic-ds-kit";
must
  • Expose aria-label describing the metrics group
  • Each child Scorecard retains its own semantics
  • selectable: the card row is role radiogroup named by aria-label; cards are role radio with aria-checked
  • selectable: roving tabindex, arrow keys move and check, Home/End jump
  • Pair a selectable strip with a chart titled after the checked metric so the change is announced by context
defaults
  • aria-label Key metrics
  • appearance cards
  • selectable false
stops if
  • Do not invent a local Scoreboard
  • Do not fake dividers with CSS borders between items — use appearance divided
  • Do not restyle Scorecard padding or borders inside Scoreboard
  • Do not inline Scorecard markup — import from ui/Scorecard
  • Do not build a metric picker from Scorecard toggles by hand — use selectable
  • Do not use selectable for actions; each card picks a view, it does not navigate
  • Do not wrap Scoreboard in Conveyor or scroll it sideways — more figures wrap
  • Do not use Conveyor as a metric picker — use selectable
  • Scoreboard has no loading or error prop: while its data loads or fails, render kit Skeleton, LoadError or Empty in its place

From contracts/scoreboard.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
aria-labelstringNoKey metricsNames the section, and the radiogroup when selectable.
itemsarrayYes—2–6 sit in one row of equal columns (five or six go three to a row below 64rem of strip width). More than six wrap four to a row. Below about 38rem, four or more go two by two; three stack. With selectable, each item's id (or label) is its value. Each item passes its own Scorecard look through (goodWhen, sparklineVariant, reference, compare, highlightLast, sparklineDates, meter), so a strip can mix them.
scrollbooleanNo—Deprecated, no effect. Scoreboard no longer composes Conveyor: more figures wrap instead of scrolling.
appearancecards | dividedNocardscards: framed Scorecards with a gap. divided: plain Scorecards with thin border.faint rules between them; when the strip wraps the rules run both ways (two by two on a phone), and three stack with horizontal rules below about 38rem.
selectablebooleanNofalseThe strip becomes a radiogroup named by aria-label. Each card is role radio with aria-checked; one card is in the tab order; arrow keys move and check (wrapping), Home and End jump. The strip sets each card's selected and onClick (an item onClick still runs).
valuestringNo—Controlled checked item: its id, or label. Selectable only.
defaultValuestringNo—Uncontrolled first checked item. Defaults to the first item. Selectable only.
onValueChangefunctionNo—(value: string) => void when the checked item changes.
  • Component
    →

    Scorecard

    one KPI with label, value, optional delta/trend/hint/badge

  • Block
    →

    Eval suite

    Test a candidate agent version against the baseline, case by case, before you ship it.

  • Block
    →

    KPI board

    The top of a dashboard: three to six KPIs, a chart for the one you pick, and its top rows.

  • Screen
    →

    Billing ops command center

    The morning page for a billing ops lead: what is at risk today, what agents are doing about it, and what needs a person.