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
  • Chart

    Chart

    2
  • Radio Card

    Radio Card

    1
  • Switch

    Switch

    1
  • Input

    Input

    1
  • Badge

    Badge

    1
  • Textarea

    Textarea

  • Tabs

    Tabs

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Photo Deck

    Photo Deck

    47
  • Folded Card

    Folded Card

    45
  • Statistics Card 10

    Statistics Card 10

    304
  • Statistics Card 2

    Statistics Card 2

    309
  • Statistics Card 7

    Statistics Card 7

    336
  • CTA Section

    CTA Section

    6
  • Liquid Glass Card

    Liquid Glass Card

    198