ComponentsKPI

displaytexulinot agent-emittableapp

KPI

kpi

A formatted metric with unit, previous-period delta and optional link.

Live examples

Orders KPI

Orders KPI

Loading demo…

Props

Public props for KPI
NameKindRequiredDefaultDescription
labelstringyes——
valuenumberno—Current numeric value (nullable)
unitenum (number, compact, cents, percent)no"number"—
currencystringno—ISO currency when unit is cents
previousnumberno——
comparisonLabelstringno——
positiveenum (up, down)no"up"—
sparklineslotno——
hrefstringno——
hrefTrustenum (developer, untrusted)no"developer"—
loadingbooleannofalse—
emptyunknownno—true or empty message string
variantenum (elevated, flat)no"elevated"—
classstringno——

Keyboard

Keyboard behavior for KPI
KeyAction
—See accessibility notes for keyboard behavior.

Accessibility

  • Loading and empty states are announced; linked tiles use real anchors after URL policy.

Evidence for kpi

Latest committed gates for kpi (as of 2026-10-23). Static snapshot — not live CI.

Behavior

n/ano behavior scenario

No dedicated behavior scenario for this catalog id (a styled or display surface, covered by its unit and axe tests).

Size (gzip)

texuli/kpi · budget 12.0 KiB

Budget from texuli.budgets.json; re-measure with `pnpm size --filter <entry>`.

Axe

documented

  • tests/e2e/site-component-pages.spec.ts
  • docs/quality (a11y-*)

Site component pages axe gate; package-level a11y docs under docs/quality when present.

Browsers

  • chromium
  • webkit
  • mobile

Playwright projects: Desktop Chrome, Desktop Safari, Pixel 7. Firefox is a known gap on this host.

When to use

Use when

  • Show a numeric KPI with unit formatting and comparison

Don’t use when

Prefer another component

  • A free-form already-formatted string (use stat)