Components › Display

Stat

One number with its label, change against a previous period and a sparkline.

Installation

npx plankui@latest add stat

Usage

import { Stat } from "@/components/ui/stat";

<Stat label="Revenue" value="$48,210" delta={12.4} deltaLabel="vs last month" trend={series} />

API reference

PropTypeDefaultDescription
label / valueReactNoderequiredWhat and how much.
deltanumberPercent change.
invertbooleanfalseTreat a fall as good.
trendnumber[]Series for the sparkline.

View the source on GitHub