Stat

A metric tile: label, value, change against a previous period, note.

Source on GitHub

Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-stat> · RayStat

PropertyAttributeTypeDefaultDescription
labellabelstringWhat is measured.
valuevaluestringThe figure, already formatted.
diffdiffnumberChange (positive is shown as good, in green; see inverse).
diffUnitdiff-unitstring%Unit of diff.
notenotestringA line under the value (compared to…).
inverseinverse reflectsbooleanLower is better (errors, latency): negative diffs are green.
plainplain reflectsbooleanWithout the card around.
SlotDescription
iconIcon next to the label.
(default)Extra content (e.g. a ray-progress).

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
stat.upUp {value}
stat.downDown {value}
stat.flatNo change {value}