Statistic
KPI card — label, big value, coloured delta (with polarity for costs/latency), icon and a trend sparkline.
3 files · 146 locdeps: clsx, tailwind-merge
Installation
With the shadcn CLI, pointing at this platform’s registry:
npx shadcn@latest add https://opusui.131199999.xyz/r/statistic.jsonOr offline, straight from your opus55 checkout (copies every file it needs):
node ../tailwind_component/opus55/scripts/add.mjs statisticUsage
import { Statistic } from "@/components/opus/ui/statistic";
<Statistic label="Revenue" value="$84,210" delta={12.4} trend={series} />API
| Prop | Type | Default | Description |
|---|---|---|---|
| label / value / hint / icon | ReactNode | — | Content. |
| delta | number | — | Percent change. |
| polarity | "up-good" | "up-bad" | "up-good" | Which direction is green. |
| trend | number[] | — | Sparkline data. |