{
  "title": "Stat 4",
  "description": "A statistic card featuring a primary metric value, trend indicator, and a responsive area sparkline chart.",
  "name": "dashboard-stat-4",
  "dependencies": [
    "recharts"
  ],
  "registryDependencies": [
    "card",
    "chart"
  ],
  "type": "registry:block",
  "files": [
    {
      "path": "components/blocks/dashboard/stat/stat-4.tsx",
      "type": "registry:block",
      "content": "import { UserCheckIcon } from \"lucide-react\";\nimport { Area, AreaChart } from \"recharts\";\n\nimport { Card, CardAction, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer } from \"@/components/ui/chart\";\n\nexport type Stat4Props = {\n    title?: string;\n    value?: string | number;\n    changeValue?: string;\n    timeText?: string;\n    trend?: \"up\" | \"down\";\n    chartData?: { value: number }[];\n};\n\nconst defaultChartData = [\n    { value: 40 },\n    { value: 46 },\n    { value: 44 },\n    { value: 48 },\n    { value: 52 },\n    { value: 58 },\n    { value: 64 },\n];\n\nconst chartConfig: ChartConfig = {\n    activation: {\n        label: \"Activation Rate\",\n        color: \"var(--chart-2)\",\n    },\n};\n\nexport const Stat4 = ({\n    title = \"User Activation\",\n    value = \"64.2%\",\n    changeValue = \"+4.8%\",\n    timeText = \"vs last month\",\n    trend = \"up\",\n    chartData = defaultChartData,\n}: Stat4Props) => {\n    return (\n        <Card>\n            <CardHeader>\n                <CardTitle className=\"font-medium\">{title}</CardTitle>\n                <CardAction>\n                    <UserCheckIcon className=\"size-5\" />\n                </CardAction>\n            </CardHeader>\n            <CardContent>\n                <div className=\"bg-muted/20 rounded-md border py-0 ps-5 pe-2\">\n                    <div className=\"grid grid-cols-2 items-center gap-4\">\n                        <div>\n                            <div className=\"text-3xl font-semibold\">{value}</div>\n                            <div className=\"mt-1 flex items-center gap-1 text-xs\">\n                                <span\n                                    className={\n                                        trend === \"up\" ? \"font-medium text-green-500\" : \"text-destructive font-medium\"\n                                    }>\n                                    {changeValue}\n                                </span>\n                                <span className=\"text-muted-foreground\">{timeText}</span>\n                            </div>\n                        </div>\n                        <div className=\"h-20 w-full\">\n                            <ChartContainer config={chartConfig} className=\"h-full w-full\">\n                                <AreaChart data={chartData}>\n                                    <defs>\n                                        <linearGradient id=\"fillActivation\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                                            <stop offset=\"5%\" stopColor=\"var(--color-activation)\" stopOpacity={0.4} />\n                                            <stop offset=\"95%\" stopColor=\"var(--color-activation)\" stopOpacity={0.0} />\n                                        </linearGradient>\n                                    </defs>\n                                    <Area\n                                        dataKey=\"value\"\n                                        type=\"monotone\"\n                                        fill=\"url(#fillActivation)\"\n                                        stroke=\"var(--color-activation)\"\n                                        strokeWidth={2}\n                                        dot={false}\n                                    />\n                                </AreaChart>\n                            </ChartContainer>\n                        </div>\n                    </div>\n                </div>\n            </CardContent>\n        </Card>\n    );\n};\n"
    }
  ],
  "mcp": {
    "description": "A statistic card featuring a primary metric value, trend indicator, and a responsive area sparkline chart. Relies on card, chart. Ideal when an AI agent needs to compose section layouts or application views.",
    "tags": [
      "block",
      "dashboard",
      "stat"
    ]
  }
}