Skip to main content
A stat displays a number. When it changes, the digits roll to the new value and a small indicator shows how far it moved. Stats are read-only and do not save.
Stat cards showing values and their change indicators

Properties

name
string
The label.
description
string
Hint text under the label. Optional.
icon
string | number
An icon shown beside the label. Optional.
value
number
default:"0"
The initial value.
prefix
string
default:"\"\""
Text before the number.
suffix
string
default:"\"\""
Text after the number.
display
string
default:"\"value\""
On a compact card, show the "value" or the "change".
compact
boolean
default:"false"
Show a small card. Forced on inside a row.
changeMode
string
default:"\"percentage\""
Show the delta as "percentage" or "absolute".
changeBaseline
string
default:"\"previous\""
Measure change from the "previous" value or the "initial" one.
numberEasing
boolean
default:"true"
Roll the digits rather than snap to the new value.

Handle

.value
number
The current value.
Set(value)
Set the value.
ResetBaseline(value?)
Zero the change indicator.