label | LocalizedMessage | DisplayValue | — | The metric's name. Always a heading, so the dashboard outline names every tile. |
value | number | LocalizedMessage | DisplayValue | null | — | The metric. Each change rolls the digits that changed.
The metric as copy or data.
No value. |
announcement | LocalizedMessage | — | Copy a polite live region announces after a change of value has settled. Not announced on first paint.
Text does not roll.
An empty value does not roll. |
aria-label | LocalizedMessage | DisplayValue | — | A static card has no action to name.
Accessible name of the action ("Show queue depth"). The overlay button carries it. |
aria-pressed | boolean | — | A static card has no action to toggle.
Toggle state. Omit for a plain action; true paints the accent edge. |
children | undefined | — | The card is a closed preset. It takes no children. |
className | string | — | Classes appended after the generated classes. Put overrides in @layer chroma.overrides. |
controls | ReactNode | — | Interactive group in the header, such as a SegmentedControl.
An action card holds no other interactive control. |
delta | MetricCardDelta | — | The change beside the value.
An empty value has nothing to compare. |
emptyLabel | LocalizedMessage | — | A numeric value has no empty-state copy.
A text value has no empty-state copy.
Names the gap for assistive technology ("No calls today"). |
emptyText | LocalizedMessage | — | A numeric value has no empty-state placeholder.
A text value has no empty-state placeholder.
Visible placeholder. Omit it for an em dash. |
formatOptions | NumberFormatOptions | — | Intl.NumberFormat options: currency, percent, units, compact notation, fraction digits, sign display.
Text is not formatted.
An empty value is not formatted. |
from | number | — | Entrance: the first paint shows this number, then the digits roll to value. Read on mount only.
Text does not roll.
An empty value does not roll. |
headingLevel | CardHeadingLevel | CardHeadingLevel.H3 | Heading element for the label. The label's type role is fixed, so the rank follows the page outline. |
loading | boolean | — | Replace the value, delta, subtitle and sparkline with a skeleton and mark the body busy.
Show the value and delta. |
loadingLabel | LocalizedMessage | — | The one loading status assistive technology reads. Visually hidden: the skeleton is the visible cue.
A card that is not loading has no loading copy. |
locale | string | — | BCP 47 locale for the value and the delta. Defaults to the runtime locale, so a server-rendered page that must
match the client passes it explicitly. |
onClick | MouseEventHandler<HTMLButtonElement> | — | A static card has no action.
Runs when the card is activated by pointer, Enter or Space. |
prefix | TextAffix | — | Localized copy before the number, or a function of the number that returns it. Include any separating space.
Text is not formatted.
An empty value is not formatted. |
ref | Ref<HTMLDivElement> | — | Ref to the card's root element. |
roll | boolean | true | Roll the digits of the value and the delta to each new number. false renders them as plain formatted text and
drops from and announcement. |
size | MetricCardSize | MetricCardSize.Default | Padding and value type. |
sparkline | ReactNode | — | Slot for a sparkline from Charts. Mounted aria-hidden in a fixed-height box under the value, so it must repeat
nothing the value, delta and subtitle do not already say. |
subtitle | LocalizedMessage | DisplayValue | — | Supporting copy under the value, such as the period the value covers. |
suffix | TextAffix | — | Localized copy after the number, or a function of the number that returns it. Include any separating space.
Text is not formatted.
An empty value is not formatted. |