Patterns

Stat cards (premium KPIs)

icon · spark (area to the edge) · target (ring) · gradient (the lead number, one per page) · comparison (split bar).

Revenue today

$48,250
12.4%vs yesterday

Cars inside

312
6.2%vs last Thu

Failed payments

3
40.0%vs last week

Monthly target

৳9.6L

of ৳13.3L this month

72%

Occupancy, 14 days

82%
4.1%vs prior 14 days

Avg wait at the gate

38s
9.5%slower

How people paid

Cash at the gate

৳28,450

Digital

৳19,800

59%41%

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { StatCard, StatGrid } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<StatCard>

src/components/patterns/stat-card.tsx
PropTypeDefaultDescription
labelrequiredstring—
valuerequiredReact.ReactNode—
currencyboolean—Put the active currency symbol before the value.
deltanumber—
invertDeltaboolean—
deltaLabelstring—"vs last week" — what the delta compares with.
hintReact.ReactNode—
iconReact.ReactNode—
toneTone"info"
variant"icon" | "spark" | "target" | "gradient" | "comparison""icon"
sparknumber[]—spark: the series, oldest first.
target{ percent: number; label: string }—target: progress 0–100 and the goal in words.
parts[{ label: string; value: number; display?: string }, { label: string; value: number; display?: string }]—comparison: two parts of the whole.
classNamestring—

<StatGrid>

src/components/patterns/stat-card.tsx
PropTypeDefaultDescription
childrenrequiredReact.ReactNode—
classNamestring—

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui