{"$schema":"https://ui.shadcn.com/schema/registry-item.json","author":"Eduardo Calvo <educlopez93@gmail.com>","css":{},"dependencies":["motion"],"description":"A SoftBlurIn 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 SoftBlurInProps {\n  children: string;\n  className?: string;\n  /** Delay before the animation starts, in milliseconds. */\n  delay?: number;\n  /** Per-character stagger, in milliseconds. */\n  stagger?: number;\n  /** Animate only once the text scrolls into view. */\n  triggerOnView?: boolean;\n}\n\nconst DURATION_S = 0.9;\nconst MS = 1000;\n// Apple's signature ease-out.\nconst EASE = [0.22, 1, 0.36, 1] as const;\n\n/**\n * SoftBlurIn — per-character fade-in with a gentle blur and upward motion,\n * Apple's signature hero-title reveal. From the animate-text catalog\n * (`soft-blur-in`). Best on hero titles 48px+ over solid backgrounds.\n */\nexport default function SoftBlurIn({\n  children,\n  className = \"\",\n  delay = 0,\n  stagger = 25,\n  triggerOnView = false,\n}: SoftBlurInProps) {\n  const ref = useRef<HTMLSpanElement>(null);\n  const inView = useInView(ref, { once: true });\n  const shouldReduceMotion = useReducedMotion();\n  const play = (!triggerOnView || inView) && !shouldReduceMotion;\n  const characters = Array.from(children);\n\n  return (\n    <span aria-label={children} className={className} ref={ref}>\n      {characters.map((char, index) => (\n        <motion.span\n          animate={play ? { filter: \"blur(0px)\", opacity: 1, y: 0 } : undefined}\n          aria-hidden=\"true\"\n          initial={\n            shouldReduceMotion\n              ? { opacity: 1 }\n              : { filter: \"blur(12px)\", opacity: 0, y: 16 }\n          }\n          // biome-ignore lint/suspicious/noArrayIndexKey: characters have no stable id\n          key={index}\n          style={{ display: \"inline-block\", whiteSpace: \"pre\" }}\n          transition={\n            shouldReduceMotion\n              ? { duration: 0 }\n              : {\n                  delay: delay / MS + (index * stagger) / MS,\n                  duration: DURATION_S,\n                  ease: EASE,\n                }\n          }\n        >\n          {char === \" \" ? \" \" : String(char)}\n        </motion.span>\n      ))}\n    </span>\n  );\n}\n","path":"index.tsx","target":"components/smoothui/soft-blur-in/index.tsx","type":"registry:ui"}],"name":"soft-blur-in","registryDependencies":[],"title":"Soft Blur In","type":"registry:ui"}