{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "presence-fade",
  "title": "Presence Fade",
  "description": "A tiny mount and unmount wrapper for fade, scale, and slide transitions.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/corr/components/presence-fade.tsx",
      "content": "\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\"\n\nexport type PresenceFadeMode = \"fade\" | \"scale\" | \"slide\"\n\nexport function PresenceFade({\n  show,\n  children,\n  mode = \"fade\",\n}: {\n  show: boolean\n  children: ReactNode\n  mode?: PresenceFadeMode\n}) {\n  const reduceMotion = useReducedMotion()\n  const variants = reduceMotion\n    ? {\n        initial: { opacity: 0 },\n        animate: { opacity: 1 },\n        exit: { opacity: 0 },\n      }\n    : mode === \"scale\"\n      ? {\n          initial: { opacity: 0, scale: 0.98 },\n          animate: { opacity: 1, scale: 1 },\n          exit: { opacity: 0, scale: 0.98 },\n        }\n      : mode === \"slide\"\n        ? {\n            initial: { opacity: 0, y: 6 },\n            animate: { opacity: 1, y: 0 },\n            exit: { opacity: 0, y: -4 },\n          }\n        : {\n            initial: { opacity: 0 },\n            animate: { opacity: 1 },\n            exit: { opacity: 0 },\n          }\n\n  return (\n    <AnimatePresence initial={false} mode=\"popLayout\">\n      {show ? (\n        <motion.div\n          initial={variants.initial}\n          animate={variants.animate}\n          exit={variants.exit}\n          transition={{ duration: reduceMotion ? 0 : 0.18, ease: \"easeOut\" }}\n        >\n          {children}\n        </motion.div>\n      ) : null}\n    </AnimatePresence>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}