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

    7
  • Chart

    Chart

    3
  • Radio Card

    Radio Card

    2
  • Badge

    Badge

    2
  • Card

    Card

    2
  • Switch

    Switch

    1
  • Checkbox Card

    Checkbox Card

    1
  • Input

    Input

    1

More in Cards

View all
  • Stats cards with links

    Stats cards with links

    46
  • Course Design Cards

    Course Design Cards

    1.3K
  • Liquid Glass Card

    Liquid Glass Card

    202
  • Statistics Card 2

    Statistics Card 2

    321
  • Card Studio

    Card Studio

    37
  • Astryx Clickable Card

    Astryx Clickable Card

    1
  • Admin Dashboard Cards

    Admin Dashboard Cards

    40
  • Statistics Card 10

    Statistics Card 10

    307