bloxa

Stat

FREE

Metric card with a counting value, a colored change and a sparkline.

Installation

Terminal
npx @bloxa/cli add stat
# or: npx shadcn@latest add @bloxa/stat

Examples

Dashboard

invertDelta on errors: a drop shows green.

Revenue
TRY 128,450+12.4%vs last month
Customers
2,841+5.2%
Orders
612-3.1%
Errors
14-42%

API reference

Every component also accepts the props of the element it renders.

Stat

PropTypeDefaultDescription
label / valueReactNode / number—Label and value.
formatIntl.NumberFormatOptions—Value format (currency, percent).
deltanumber—Change vs previous period; 0.12 = 12%.
invertDeltabooleanfalseWhen lower is better (cost, errors).
trendnumber[]—Sparkline below.
variant"card" | "plain""card"Card or plain.