About
A dashboard KPI tile with an accessible animated counter, trend badge, area, line or bar chart with an optional target line, goal progress bar, icon, locale-aware or compact formatting, inverted trends, and loading, empty and skeleton states. Ships as a card, glass surface or borderless plot.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Kpi Counter to your project and fits it to your theme.
Code
How Kpi Counter is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
/**
* PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
*/
import { DollarSign, Gauge, Users } from "lucide-react";
import { KpiCounter } from "@/components/ui/kpi-counter";
export default function KpiCounterDemo() {
return (
<main className="flex min-h-screen w-full items-center justify-center bg-background px-6 py-12">
<div className="grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3">
<KpiCounter
label="Monthly revenue"
value={128_450}
from={112_400}
prefix="$"
locale="en-US"
delta={14.3}
points={[82, 88, 91, 97, 104, 110, 108, 117, 121, 119, 126, 128]}
target={135}
targetLabel="Goal"
chart="area"
chartHeight={84}
progress={64}
progressLabel="Quarter goal"
icon={<DollarSign className="size-4" />}
/>
<KpiCounter
label="Active users"
value={48_210}
from={42_000}
delta={14.8}
points={[28, 32, 30, 36, 39, 37, 42, 44, 43, 47, 49, 51]}
chart="bars"
chartHeight={84}
progress={78}
progressLabel="Seat capacity"
variant="glass"
icon={<Users className="size-4" />}
/>
<KpiCounter
label="Bounce rate"
value={24.6}
from={27.1}
decimals={1}
suffix="%"
delta={-9.2}
invertDelta
points={[27.1, 26.4, 26.8, 25.9, 25.2, 25.6, 24.9, 25.1, 24.7, 24.8, 24.5, 24.6]}
chart="line"
chartHeight={84}
className="sm:col-span-2 lg:col-span-1"
icon={<Gauge className="size-4" />}
/>
</div>
</main>
);
}
















