Skip to content

DisplayStat ​

A figure with its label and how it changed, read by a screen reader as words and not only as an arrow.

ts
import { DisplayStat } from '@zairakai/vue-components/Display'

Usage ​

vue
<DisplayStat />

Example ​

Sales
1 280

Up 12.5%

Errors
14

Up 3%

vue
<template>
  <DisplayStat
    label="Sales"
    value="1 280"
    :change="12.5"
  />
  <DisplayStat
    label="Errors"
    value="14"
    :change="3"
    :up-is-good="false"
  />
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
labelstring
valuestring|number
changenumberundefinedThe change since before: a number, positive or negative.
changeUnitstring'%'The unit or sign shown after the change: "%".
upIsGoodbooleantrueWhether going up is good news (turnover) or bad (errors).
changeLabelstring'{direction} {value}'The text read for the change. Use {value}, {direction}.
increaseWordstring'Up'
decreaseWordstring'Down'

Slots ​

NameDescription
label
default

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.