Skip to content

zk-stat ​

A figure with its label and, optionally, its change.

Props ​

PropTypeDefaultDescription
labelstring|nullnullLabel
valuestring|int|nullnullValue, when there is no slot
changeint|float|nullnullChange in percent: gives the direction (up, down, flat) and the text
sentimentstring|nullnullpositive, negative or neutral. By default, up is positive and down is negative
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultReplaces the value

Class hooks: stat, stat-list, stat-label, stat-value, stat-change, stat-arrow, stat-change-text; data-direction and data-sentiment on stat-change.

Examples ​

With a change ​

blade
<x-zk-stat label="Visits" value="1.2K" :change="12" />

A fall that is good news ​

blade
<x-zk-stat label="Errors" :change="-3" sentiment="positive">42</x-zk-stat>

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.