Arihant jain

Insight Cards

Dashboards 31

About

A grid or row of metric cards showing a label, value, spark bar chart, trend delta, and an optional AI-generated note.

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

Code

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

Usage.tsx

import InsightCards, { type Insight } from "@/components/ui/insight-cards";

export default function InsightCardsDemo() {
  const insights: Insight[] = [
    {
      id: "revenue",
      label: "Revenue",
      value: "$48.2k",
      change: 12.4,
      spark: [30, 45, 40, 60, 55, 70, 90],
      note: "Revenue growth is accelerating week over week.",
    },
    {
      id: "churn",
      label: "Churn Rate",
      value: "2.1%",
      change: -3.2,
      spark: [70, 60, 65, 50, 45, 40, 35],
      note: "Churn continues to trend down after the pricing update.",
    },
    {
      id: "active-users",
      label: "Active Users",
      value: "12,480",
      change: 5.6,
      spark: [40, 42, 44, 43, 48, 50, 55],
    },
    {
      id: "nps",
      label: "NPS Score",
      value: "64",
      change: 1.8,
      spark: [58, 59, 60, 61, 62, 63, 64],
    },
  ];

  return (
    <div className="flex w-full items-center justify-center p-6">
      <InsightCards insights={insights} variant="Grid" />
    </div>
  );
}

Dependencies

More by Arihant jain

View all
  • Footer section

    Footer section

    1.9K
  • Multistep Form

    Multistep Form

    698
  • Animated Drawer

    Animated Drawer

    686
  • Status Badge

    Status Badge

    495
  • Stacked Circular Footer

    Stacked Circular Footer

    413
  • Input Modal

    Input Modal

    316
  • Large Name Footer

    Large Name Footer

    193
  • Profile Dropdown

    Profile Dropdown

    187

More in Dashboards

View all
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.4K
  • Sidebar

    Sidebar

    234
  • SaaS Template

    SaaS Template

    2.4K
  • Chat template

    Chat template

    598
  • Stats Bento

    Stats Bento

    1.1K
  • Financial Bento Grid

    Financial Bento Grid

    71
  • Statistics Card 2

    Statistics Card 2

    264
  • Course Design Cards

    Course Design Cards

    1.1K

Explore more

Part of Spectrum UI — browse the full library on 21st.dev.