{
  "title": "Stat 2",
  "description": "A detailed dashboard card highlighting total revenue with trend indicators and percentage growth.",
  "name": "dashboard-stat-2",
  "dependencies": [],
  "registryDependencies": [
    "card",
    "badge"
  ],
  "type": "registry:block",
  "files": [
    {
      "path": "components/blocks/dashboard/stat/stat-2.tsx",
      "type": "registry:block",
      "content": "import { MinusIcon, TrendingDownIcon, TrendingUpIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle } from \"@/components/ui/card\";\n\nexport type Stat2Props = {\n    title: string;\n    value: string | number;\n    trendValue: number;\n    footerLabel: string;\n    footerSubtext: string;\n};\n\nexport const Stat2 = ({ title, value, trendValue, footerLabel, footerSubtext }: Stat2Props) => {\n    const isPositive = trendValue > 0;\n    const isNeutral = trendValue === 0;\n\n    const Icon = isNeutral ? MinusIcon : isPositive ? TrendingUpIcon : TrendingDownIcon;\n\n    const trendClass = isNeutral\n        ? \"text-foreground bg-muted\"\n        : isPositive\n          ? \"text-green-500 border-green-500/20 bg-green-500/10\"\n          : \"text-destructive border-destructive/20 bg-destructive/10\";\n\n    const formattedTrend = isNeutral ? \"0%\" : `${isPositive ? \"+\" : \"\"}${trendValue}%`;\n\n    return (\n        <Card className=\"@container/card w-full max-sm:py-4\">\n            <CardHeader>\n                <CardDescription className=\"font-medium\">{title}</CardDescription>\n                <CardTitle className=\"text-2xl font-semibold @[600px]/card:text-4xl @[800px]/card:text-5xl\">\n                    {value}\n                </CardTitle>\n                <CardAction>\n                    <Badge variant=\"outline\" className={cn(\"gap-1 px-1.5 py-0.5\", trendClass)}>\n                        <Icon className=\"size-3\" />\n                        {formattedTrend}\n                    </Badge>\n                </CardAction>\n            </CardHeader>\n\n            <CardFooter className=\"flex-col items-start gap-1 text-sm max-sm:px-4\">\n                <div className=\"line-clamp-1 flex items-center gap-1.5 font-medium\">\n                    <span className={isNeutral ? \"\" : isPositive ? \"text-green-500\" : \"text-destructive\"}>\n                        {footerLabel}\n                    </span>\n                    <Icon\n                        className={cn(\n                            \"size-3.5\",\n                            isNeutral ? \"text-muted-foreground\" : isPositive ? \"text-green-500\" : \"text-destructive\",\n                        )}\n                    />\n                </div>\n                <div className=\"text-muted-foreground text-xs\">{footerSubtext}</div>\n            </CardFooter>\n        </Card>\n    );\n};\n"
    }
  ],
  "mcp": {
    "description": "A detailed dashboard card highlighting total revenue with trend indicators and percentage growth. Relies on card, badge. Ideal when an AI agent needs to compose section layouts or application views.",
    "tags": [
      "block",
      "dashboard",
      "stat"
    ]
  }
}