{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "stats-section-shadcnui", "type": "registry:page", "title": "Stats Section", "description": "Animated statistics section with cards and counters", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/sections/stats-section.tsx", "content": "\"use client\";\n\nimport { Card } from \"@/components/ui/card\";\nimport {\n motion,\n useInView,\n useReducedMotion,\n type Variants,\n} from \"framer-motion\";\nimport { Award, TrendingUp, Users, Zap } from \"lucide-react\";\nimport { useId, useMemo, useRef } from \"react\";\n\nconst stats = [\n {\n icon: Users,\n value: \"52K+\",\n label: \"Active teams\",\n description: \"Shipping motion-led products every month.\",\n },\n {\n icon: TrendingUp,\n value: \"99.97%\",\n label: \"Realtime uptime\",\n description: \"Glassmorphic dashboards without the downtime.\",\n },\n {\n icon: Award,\n value: \"162\",\n label: \"Industry launches\",\n description: \"Recognized experiences powered by our system.\",\n },\n {\n icon: Zap,\n value: \"1,240+\",\n label: \"Reusable primitives\",\n description: \"Motion-ready components ready for your stack.\",\n },\n];\n\nexport function StatsSection() {\n const ref = useRef(null);\n const isInView = useInView(ref, { once: true, margin: \"-20% 0px\" });\n const shouldReduceMotion = useReducedMotion();\n\n const headingId = useId();\n const descriptionId = useMemo(() => `${headingId}-description`, [headingId]);\n\n const containerVariants: Variants = useMemo(\n () => ({\n hidden: {\n opacity: shouldReduceMotion ? 1 : 0,\n y: shouldReduceMotion ? 0 : 24,\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: shouldReduceMotion\n ? { duration: 0 }\n : {\n duration: 0.6,\n ease: \"easeOut\",\n staggerChildren: 0.14,\n delayChildren: 0.12,\n },\n },\n }),\n [shouldReduceMotion]\n );\n\n const cardVariants: Variants = useMemo(\n () => ({\n hidden: {\n opacity: shouldReduceMotion ? 1 : 0,\n y: shouldReduceMotion ? 0 : 28,\n filter: shouldReduceMotion ? \"none\" : \"blur(6px)\",\n },\n visible: {\n opacity: 1,\n y: 0,\n filter: \"none\",\n transition: shouldReduceMotion\n ? { duration: 0 }\n : { type: \"spring\", mass: 0.8, stiffness: 160, damping: 24 },\n },\n }),\n [shouldReduceMotion]\n );\n\n const iconVariants: Variants = useMemo(\n () => ({\n hidden: {\n scale: shouldReduceMotion ? 1 : 0.6,\n opacity: shouldReduceMotion ? 1 : 0,\n },\n visible: {\n scale: 1,\n opacity: 1,\n transition: shouldReduceMotion\n ? { duration: 0 }\n : { duration: 0.45, ease: [0.18, 0.89, 0.32, 1.28] },\n },\n }),\n [shouldReduceMotion]\n );\n\n return (\n \n
\n \n \n
\n\n \n \n \n Proof in metrics\n \n \n \n Trusted glassmorphism at product scale\n \n \n Teams ship faster when motion, accessibility, and theming live in\n the same toolkit. Here are the signals that matter.\n \n \n\n \n {stats.map((stat, index) => {\n const Icon = stat.icon;\n return (\n \n
\n \n \n \n \n
\n
\n
{stat.label}
\n
\n {stat.value}\n
\n
\n
\n
\n {stat.label}\n
\n
\n {stat.description}\n
\n
\n
\n
\n \n );\n })}\n \n \n \n );\n}\n", "type": "registry:page", "target": "components/uitripled/stats-section-shadcnui.tsx" } ] }