Skip to content

Stats Band

Three or four headline numbers that count up as the band scrolls into view, with labels and a footnote for where the numbers come from.

On this page
Used for
  • Runs per day
  • Uptime proof
  • Usage milestones
  • Headline numbers

Examples

Tone
Count

Installation

npx knowns-ui@latest add stats-band
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

stats
{ value, label, prefix?, suffix?, format?, detail?, visual?, context? }[]
value is a number; format takes Intl.NumberFormat options (compact, decimals, currency). Labels key the list.
stats[].visual
{ kind: "trend", values } | { kind: "bars", values } | { kind: "distribution", bins, marker? }
A tiny proof chart under the number, in one ink colour. trend: a line over time. bars: one bar per period (scaled between the lowest and highest value, e.g. daily uptime). distribution: a histogram; marker (0 to 1) is where the number sits.
stats[].context
ReactNode
A line that fades in on hover or focus where a mouse is present, and is always shown on touch screens. Its space is reserved, so nothing moves. The cell takes focus when it has one.
footnote
ReactNode
Where the numbers come from, and when.
tone
"plain" | "card" | "divided"
Default"plain"
Numbers on the page with a hairline on the left, a framed panel with dividers, or a hairline grid.
eyebrow / title / lead
ReactNode
An optional heading.

Numbers count up once, when the band comes into view, in a reserved space, so nothing reflows. With reduced motion they show their final value. Use numbers you can source, and say where they come from.

What it handles

  1. 01Shows 3 or 4 headline numbers, each with a value, a label, a prefix, a suffix and Intl.NumberFormat options such as compact notation.
  2. 02Rolls every number up from 0 with NumberTicker when the band scrolls into view.
  3. 03Draws a small proof visual under a number: a trend line, daily bars scaled between the lowest and highest value, or a distribution with a marker.
  4. 04Reveals a context line on hover or focus where a mouse is present, shows it always on touch screens, and reserves its space so nothing moves.
  5. 05Makes a cell with a context line focusable, so keyboard users reach the same line.
  6. 06Comes in plain, card and divided tones, and adds a footnote under the band for the source of the numbers.

States

Scrolls into view
Each number counts up from 0 to its value
none
Context line, hover or focus
The line fades in where a mouse is present
180ms, ease out
Touch screen
The context line is already visible
none
Proof visual
The trend, bars or histogram paint as they are
none
Reduced motion
The final numbers show at once
0ms

Works with

When to use

When to use

  • Three or four numbers that make a point, like usage, uptime or time saved, with a footnote for the source.

When not to use

  • Live metrics that change while someone reads: use a dashboard: use Agent Ops Dashboard.
  • Numbers you cannot source.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Stats Band to my app and wire it to my own data.
  • I need three or four numbers that make a point, like usage, uptime or time saved, with a footnote for the source. Set that up with the Knowns UI Stats Band.
  • Which Stats Band props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "stats-band" }) and search_docs({ query: "stats band" }).

Need help?

Stuck on Stats Band, or found something off? We read every message.