DXStatCard

DXStatCard

A KPI / stat tile: a big formatted value with a title, optional subtitle, an optional up/down delta badge (auto-coloured and arrowed) versus a comparison period, and an optional trend/sparkline slot. Themed with Bootstrap variables.

Live Examples

Revenue
This week
£6,480.55
61%vs last week
New customers
This week
128
12%vs last week
Refund rate
Lower is better
2.4%
0.6%vs last week

Props

Name Click to sort ascendingType Required Click to sort ascendingDefault Description
titlestringYes-Metric label, e.g. "Revenue"
valuestring | numberYes-The metric value. Numbers are formatted per `format`; strings pass through
subtitlestringNo-Secondary line under the title, e.g. "This week"
format'number' | 'currency' | 'percent'No'number'How to format a numeric value
currencySymbolstringNo'£'Currency symbol for format: "currency"
precisionnumberNo2 for currency, else 0Decimal places
localestringNo-Locale for number grouping/formatting
deltanumberNo-Change vs a comparison period; its sign drives the arrow/colour
deltaFormat'number' | 'currency' | 'percent'No'percent'How to format the delta
deltaDirection'up' | 'down' | 'neutral'Noderived from deltaForce the delta direction
deltaLabelstringNo-Caption beside the delta, e.g. "vs last week"
invertDeltabooleanNofalseInvert the delta colour for metrics where down is good (costs, bounce rate)

Slots

Name Click to sort ascendingDescription Scoped Props
valueOverride the rendered value-
iconIcon/visual in the top-right of the card-
trendTrend visual (e.g. a sparkline) in the card footer-