{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blur-fade",
  "title": "Blur Fade",
  "description": "Blur fade in and out animation. Used to smoothly fade in and out content.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "registry/tealmac/blur-fade.tsx",
      "content": "\"use client\"\n\nimport { useRef } from \"react\"\nimport {\n  motion,\n  useInView,\n  useReducedMotion,\n  type MotionProps,\n  type UseInViewOptions,\n} from \"motion/react\"\n\ntype MarginType = UseInViewOptions[\"margin\"]\n\ninterface BlurFadeProps extends MotionProps {\n  children: React.ReactNode\n  className?: string\n  duration?: number\n  delay?: number\n  offset?: number\n  direction?: \"up\" | \"down\" | \"left\" | \"right\"\n  inView?: boolean\n  inViewMargin?: MarginType\n  blur?: string\n}\n\n/**\n * BlurFade reveals its children by animating opacity, a positional offset, and\n * a blur filter from a hidden to a visible state. The reveal can fire on mount\n * or the first time the element scrolls into view.\n */\nexport function BlurFade({\n  children,\n  className,\n  duration = 0.4,\n  delay = 0,\n  offset = 6,\n  direction = \"down\",\n  inView = false,\n  inViewMargin = \"-50px\",\n  blur = \"6px\",\n  ...props\n}: BlurFadeProps) {\n  const ref = useRef(null)\n  const inViewResult = useInView(ref, { once: true, margin: inViewMargin })\n  const reduceMotion = useReducedMotion()\n  const visible = !inView || inViewResult || reduceMotion\n\n  const axis = direction === \"left\" || direction === \"right\" ? \"x\" : \"y\"\n  const sign = direction === \"right\" || direction === \"down\" ? -1 : 1\n\n  return (\n    <motion.div\n      ref={ref}\n      // Reduced motion: render the final state with no fade, blur or shift.\n      initial={\n        reduceMotion\n          ? false\n          : { opacity: 0, filter: `blur(${blur})`, [axis]: sign * offset }\n      }\n      animate={\n        visible\n          ? { opacity: 1, filter: \"blur(0px)\", [axis]: 0 }\n          : { opacity: 0, filter: `blur(${blur})`, [axis]: sign * offset }\n      }\n      transition={{ delay: 0.04 + delay, duration, ease: \"easeOut\" }}\n      className={className}\n      {...props}\n    >\n      {children}\n    </motion.div>\n  )\n}\n\nexport default BlurFade\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}