{"$schema":"https://ui.shadcn.com/schema/registry-item.json","author":"Eduardo Calvo <educlopez93@gmail.com>","css":{},"dependencies":["motion"],"description":"A MicroScaleFade text animation component for SmoothUI.","devDependencies":[],"files":[{"content":"\"use client\";\n\nimport { motion, useInView, useReducedMotion } from \"motion/react\";\nimport { useRef } from \"react\";\n\nexport interface MicroScaleFadeProps {\n  children: string;\n  className?: string;\n  /** Delay before the animation starts, in milliseconds. */\n  delay?: number;\n  /** Animate only once the text scrolls into view. */\n  triggerOnView?: boolean;\n}\n\nconst DURATION_S = 0.6;\nconst MS = 1000;\nconst EASE = [0.32, 0.72, 0, 1] as const;\n\n/**\n * MicroScaleFade — calm, tiny scale pop used as subtle premium polish for\n * labels and headings. The whole text animates as a single element from\n * scale 0.96 to 1. From the animate-text catalog (`micro-scale-fade`).\n * Best for single words or short titles.\n */\nexport default function MicroScaleFade({\n  children,\n  className = \"\",\n  delay = 0,\n  triggerOnView = false,\n}: MicroScaleFadeProps) {\n  const ref = useRef<HTMLSpanElement>(null);\n  const inView = useInView(ref, { once: true });\n  const shouldReduceMotion = useReducedMotion();\n  const play = (!triggerOnView || inView) && !shouldReduceMotion;\n\n  return (\n    <motion.span\n      animate={play ? { opacity: 1, scale: 1 } : undefined}\n      aria-label={children}\n      className={className}\n      initial={\n        shouldReduceMotion ? { opacity: 1 } : { opacity: 0, scale: 0.96 }\n      }\n      ref={ref}\n      style={{ display: \"inline-block\" }}\n      transition={\n        shouldReduceMotion\n          ? { duration: 0 }\n          : {\n              delay: delay / MS,\n              duration: DURATION_S,\n              ease: EASE,\n            }\n      }\n    >\n      {children}\n    </motion.span>\n  );\n}\n","path":"index.tsx","target":"components/smoothui/micro-scale-fade/index.tsx","type":"registry:ui"}],"name":"micro-scale-fade","registryDependencies":[],"title":"Micro Scale Fade","type":"registry:ui"}