{ "name": "text-shimmer", "type": "registry:ui", "registryDependencies": [], "dependencies": [ "motion" ], "devDependencies": [], "tailwind": {}, "cssVars": { "light": {}, "dark": {} }, "files": [ { "path": "text-shimmer.tsx", "content": "'use client';\nimport React, { useMemo, type JSX } from 'react';\nimport { motion } from 'motion/react';\nimport { cn } from '@/lib/utils';\n\nexport type TextShimmerProps = {\n children: string;\n as?: React.ElementType;\n className?: string;\n duration?: number;\n spread?: number;\n};\n\nfunction TextShimmerComponent({\n children,\n as: Component = 'p',\n className,\n duration = 2,\n spread = 2,\n}: TextShimmerProps) {\n const MotionComponent = motion.create(\n Component as keyof JSX.IntrinsicElements\n );\n\n const dynamicSpread = useMemo(() => {\n return children.length * spread;\n }, [children, spread]);\n\n return (\n \n {children}\n \n );\n}\n\nexport const TextShimmer = React.memo(TextShimmerComponent);\n", "type": "registry:ui" } ] }