Mahmoud Ilyan

KPI Card

Cards

About

A dashboard scorecard that shows a single metric with an uppercase label, a large tabular value, and an optional delta pill with an up/down arrow and comparison hint.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds KPI Card to your project and fits it to your theme.

Code

How KPI Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import KpiCard from "@/components/ui/kpi-card";

export default function KpiCardDemo() {
  return (
    <div className="grid w-full grid-cols-1 gap-4 bg-background p-6 sm:grid-cols-2 lg:grid-cols-4">
      <KpiCard
        label="Revenue"
        value={24800}
        prefix="$"
        delta={8.4}
        deltaLabel="vs last month"
      />
      <KpiCard
        label="Active users"
        value={12480}
        delta={312}
        deltaLabel="last 7 days"
      />
      <KpiCard
        label="Conversion"
        value="3.42"
        suffix="%"
        delta={0.4}
        deltaLabel="vs prior period"
      />
      <KpiCard
        label="Sessions"
        value={89240}
        delta={-2.1}
        deltaLabel="vs last week"
      />
    </div>
  );
}

Dependencies

More by Mahmoud Ilyan

View all
  • Steps

    Steps

    5
  • Radio Card

    Radio Card

    1
  • Switch

    Switch

    1
  • Textarea

    Textarea

  • Tabs

    Tabs

  • Progress

    Progress

  • Checkbox Card

    Checkbox Card

  • Slider

    Slider

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Statistics Card 7

    Statistics Card 7

    327
  • Statistics Card 2

    Statistics Card 2

    305
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    625
  • Card Studio

    Card Studio

    5
  • The Item one

    The Item one

    4
  • Weather Card

    Weather Card

    65
  • Card

    Card

    9