Mahmoud Ilyan

Stat Card

Dashboards

About

A compact card for dashboards that shows a labeled metric value with an icon and an optional trend description.

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

Code

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

Usage.tsx

import StatCard from "@/components/ui/stat-card";
import {
  FiDollarSign,
  FiUsers,
  FiTrendingUp,
  FiActivity,
} from "react-icons/fi";

export default function StatCardDemo() {
  return (
    <div className="grid w-full max-w-4xl grid-cols-1 gap-4 p-6 sm:grid-cols-2 lg:grid-cols-4">
      <StatCard
        icon={FiDollarSign}
        label="Revenue"
        value="$48,210"
        description="+12.4% from last month"
      />
      <StatCard
        icon={FiUsers}
        label="Active Users"
        value="2,340"
        description="+5.2% from last week"
      />
      <StatCard
        icon={FiTrendingUp}
        label="Conversion Rate"
        value="3.2%"
        description="-0.4% from last month"
      />
      <StatCard icon={FiActivity} label="Sessions" value="12,903" />
    </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 Dashboards

View all
  • Creator Dashboard

    Creator Dashboard

    84
  • serf dashboard

    serf dashboard

    78
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.6K
  • Glass Dashboard

    Glass Dashboard

    1.1K
  • Adjustable Glass Dashboard

    Adjustable Glass Dashboard

    1.2K
  • App Dashboard Layout

    App Dashboard Layout

    564
  • Chart Component

    Chart Component

    46
  • Glass Smart Home Dashboard

    Glass Smart Home Dashboard