{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "stats-counter-block-shadcnui", "type": "registry:block", "title": "Stats Counter Block", "description": "Animated statistics counters with icons and gradient backgrounds", "registryDependencies": [ "button" ], "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/sections/stats-counter-block.tsx", "content": "\"use client\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Card } from \"@/components/ui/card\";\nimport { motion, useInView } from \"framer-motion\";\nimport { Award, Globe, TrendingUp, Users } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nconst stats = [\n {\n icon: Users,\n value: 50000,\n suffix: \"+\",\n label: \"Active Users\",\n description: \"Growing community worldwide\",\n bgColor: \"bg-blue-500/10\",\n iconColor: \"text-blue-500\",\n },\n {\n icon: Globe,\n value: 120,\n suffix: \"+\",\n label: \"Countries\",\n description: \"Global reach and presence\",\n bgColor: \"bg-green-500/10\",\n iconColor: \"text-green-500\",\n },\n {\n icon: TrendingUp,\n value: 98,\n suffix: \"%\",\n label: \"Satisfaction Rate\",\n description: \"Customer happiness score\",\n bgColor: \"bg-purple-500/10\",\n iconColor: \"text-purple-500\",\n },\n {\n icon: Award,\n value: 25,\n suffix: \"+\",\n label: \"Awards Won\",\n description: \"Industry recognition\",\n bgColor: \"bg-orange-500/10\",\n iconColor: \"text-orange-500\",\n },\n];\n\nfunction Counter({ value, suffix }: { value: number; suffix: string }) {\n const [count, setCount] = useState(0);\n const ref = useRef(null);\n const isInView = useInView(ref, { once: true });\n\n useEffect(() => {\n if (isInView) {\n let start = 0;\n const end = value;\n const duration = 2000;\n const increment = end / (duration / 16);\n\n const timer = setInterval(() => {\n start += increment;\n if (start >= end) {\n setCount(end);\n clearInterval(timer);\n } else {\n setCount(Math.floor(start));\n }\n }, 16);\n\n return () => clearInterval(timer);\n }\n }, [isInView, value]);\n\n return (\n \n {count.toLocaleString()}\n {suffix}\n \n );\n}\n\nexport function StatsCounterBlock() {\n return (\n
\n
\n {/* Header */}\n \n \n Our Impact\n \n

\n Numbers That Speak{\" \"}\n \n For Themselves\n \n

\n

\n We're proud of the impact we've made and the trust our\n users place in us\n

\n \n\n {/* Stats Grid */}\n
\n {stats.map((stat, index) => {\n const Icon = stat.icon;\n\n return (\n \n \n {/* Gradient overlay */}\n \n\n {/* Animated background circle */}\n \n\n
\n {/* Icon */}\n \n
\n \n
\n
\n\n {/* Counter */}\n \n \n \n\n {/* Label */}\n

\n {stat.label}\n

\n\n {/* Description */}\n

\n {stat.description}\n

\n
\n\n {/* Hover effect line */}\n \n
\n \n );\n })}\n
\n\n {/* Bottom Quote */}\n \n
\n

\n "These numbers represent real people, real businesses, and\n real success stories. We're just getting started."\n

\n \n
\n \n
\n
\n );\n}\n", "type": "registry:block", "target": "components/uitripled/stats-counter-block-shadcnui.tsx" } ] }