About
A compact statistic block that shows a label, a tabular-numeral value, an optional unit, a trend arrow (up/down/flat) and a hint line — ported to React from the Zemponet Vue 3 component library by hemingtsai, for dashboard and detail-page KPI tiles.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds ZStat to your project and fits it to your theme.
Code
How ZStat is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import ZStat from "@/components/ui/zstat";
export default function ZStatTrendIndicatorDemo() {
return (
<div className="flex flex-wrap gap-10 bg-background p-10 text-foreground">
<ZStat
label="吞吐量"
value={1280}
unit="qps"
trend="up"
hint="较上一小时"
/>
<ZStat
label="失败请求"
value={37}
unit="次"
trend="down"
hint="较上一小时"
/>
<ZStat
label="队列长度"
value={0}
unit="条"
trend="flat"
hint="没有积压"
/>
</div>
);
}














