{
  "title": "Reveal On Scroll",
  "description": "Animate content into view on scroll with effects like fade, slide, zoom, and blur.",
  "name": "motion-reveal-on-scroll",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [],
  "type": "registry:ui",
  "files": [
    {
      "path": "components/paceui/motion/reveal-on-scroll.tsx",
      "type": "registry:ui",
      "content": "import { type HTMLMotionProps, type Target, type TargetAndTransition, motion } from \"motion/react\";\n\ntype EffectType = \"fadeIn\" | \"slideInRight\" | \"zoomIn\" | \"blurIn\";\n\nexport type RevealOnScrollProps = Omit<HTMLMotionProps<\"div\">, \"initial\" | \"whileInView\" | \"viewport\"> & {\n    effect?: EffectType;\n    scrollTriggerVars?: HTMLMotionProps<\"div\">[\"viewport\"];\n    fromVars?: Target;\n    toVars?: TargetAndTransition;\n};\n\nexport const RevealOnScroll = ({\n    effect = \"fadeIn\",\n    scrollTriggerVars,\n    fromVars,\n    toVars,\n    ...props\n}: RevealOnScrollProps) => {\n    const presets: Record<EffectType, { initial: Target; whileInView: TargetAndTransition }> = {\n        fadeIn: {\n            initial: { opacity: 0, y: 50 },\n            whileInView: { opacity: 1, y: 0 },\n        },\n        slideInRight: {\n            initial: { x: 100, opacity: 0 },\n            whileInView: { x: 0, opacity: 1 },\n        },\n        zoomIn: {\n            initial: { scale: 0.8, opacity: 0 },\n            whileInView: { scale: 1, opacity: 1 },\n        },\n        blurIn: {\n            initial: { y: 30, opacity: 0, filter: \"blur(10px)\" },\n            whileInView: { y: 0, opacity: 1, filter: \"blur(0px)\" },\n        },\n    };\n\n    const preset = presets[effect] || presets.fadeIn;\n    const mergedInitial = { ...preset.initial, ...fromVars };\n    const mergedWhileInView = { ...preset.whileInView, ...toVars };\n\n    return (\n        <motion.div\n            initial={mergedInitial}\n            whileInView={mergedWhileInView}\n            viewport={{ margin: \"0px 0px -20% 0px\", once: false, ...scrollTriggerVars }}\n            transition={{ duration: 1, ...toVars?.transition }}\n            {...props}\n        />\n    );\n};\n"
    }
  ],
  "mcp": {
    "description": "Provides refined UI interactions and accessible controls. Animate content into view on scroll with effects like fade, slide, zoom, and blur. Configurable props include: Omit<HTMLMotionProps<\"div\">, \"initial\" | \"whileInView\" | \"viewport\"> & {; effect?: EffectType;; scrollTriggerVars?: HTMLMotionProps<\"div\">[\"viewport\"];; fromVars?: Target;. Relies on motion. Optimal for building reusable interface elements and user input flows.",
    "tags": [
      "component",
      "motion",
      "animation"
    ]
  }
}