Display
Stat
A labelled number for dashboards, with an optional delta, trend arrow and description line.
Monthly recurring revenue
$48,200 +12%
vs. last month
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JStat } from '@juxtui/ui'Usage #
Copy
<JStat label="Monthly recurring revenue" value="$48,200" delta="+12%" trend="up" description="vs. last month" />delta is display text, not a number — format it yourself ("+12%", "-3", "0"), trend only decides the colour and arrow.
Without trend, a delta still renders, just in a neutral colour with no arrow.
Variants & examples #
In a grid#
Three stats side by side, each with its own trend.
Active users
2,481 +8.2%
Churn
1.4% +0.3%
Support tickets
62 0%
With an icon#
Balance
$1,204.50
Next charge on Oct 1
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | What the number measures. |
| value | string | number | — | The headline number. |
| delta | string | — | Change shown next to the value, e.g. "+12%". |
| trend | 'up' | 'down' | 'neutral' | — | Colours delta and adds an arrow icon (none for neutral). |
| description | string | — | Supporting line under the value. |
Slots
| Slot | Props | Description |
|---|---|---|
| icon | — | Small icon shown next to the label. |
Accessibility #
- Renders as plain text — there’s no live region, so a stat that updates in place should be wrapped in your own
aria-liveregion if the change matters to announce. - Trend colour is reinforced by the arrow icon, not colour alone.