{"name":"text-shimmer","type":"registry:component","files":[{"path":"text-shimmer.tsx","type":"registry:component","target":"components/animated/text-shimmer.tsx","content":"import { cn } from \"@/lib/utils\";\nimport type { ComponentType, CSSProperties, ElementType, ReactNode } from \"react\";\n\nexport interface TextShimmerProps {\n  children: ReactNode;\n  as?: ElementType;\n  duration?: number;\n  className?: string;\n}\n\ntype TextShimmerRootProps = {\n  children?: ReactNode;\n  className?: string;\n  style?: CSSProperties;\n};\n\nexport function TextShimmer({ children, as: Comp = \"span\", duration = 2.5, className }: TextShimmerProps) {\n  const Root = Comp as ComponentType<TextShimmerRootProps>;\n\n  return (\n    <>\n      <style>\n        {`@keyframes beui-text-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.beui-text-shimmer{animation:none!important;background-position:50% 0}}`}\n      </style>\n      <Root\n        style={{ animation: `beui-text-shimmer ${duration}s linear infinite` }}\n        className={cn(\n          \"beui-text-shimmer\",\n          \"inline-block bg-[length:200%_100%] bg-clip-text text-transparent\",\n          \"bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]\",\n          className,\n        )}\n      >\n        {children}\n      </Root>\n    </>\n  );\n}\n"}]}