{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "primitive-scale-in",
  "type": "registry:ui",
  "title": "Scale in",
  "description": "Scale from near the final size, with an optional slight overshoot for Pop in.",
  "dependencies": [
    "motion"
  ],
  "categories": [
    "primitive",
    "entrances"
  ],
  "docs": "https://motion-lexicon.pages.dev/en/primitives/scale-in/",
  "files": [
    {
      "path": "src/registry/primitives/scale-in.tsx",
      "type": "registry:ui",
      "target": "components/motion-lexicon/primitives/scale-in.tsx",
      "content": "\"use client\";\n\nimport { AnimatePresence, motion, useReducedMotion, type Transition } from \"motion/react\";\nimport type { ReactNode } from \"react\";\n\nconst EASE_OUT = [0.16, 1, 0.3, 1] as const;\n\nexport type ScaleInPrimitiveProps = {\n  present: boolean;\n  children: ReactNode;\n  startScale?: number;\n  overshoot?: boolean;\n  duration?: number;\n  easing?: Transition[\"ease\"];\n  delay?: number;\n  origin?: string;\n  className?: string;\n};\n\nexport function ScaleInPrimitive({\n  present,\n  children,\n  startScale = 0.92,\n  overshoot = false,\n  duration = 0.2,\n  easing = EASE_OUT,\n  delay = 0,\n  origin = \"center\",\n  className,\n}: ScaleInPrimitiveProps) {\n  const reduceMotion = useReducedMotion();\n  const initial = `scale(${startScale})`;\n  const animate = overshoot\n    ? [initial, \"scale(1.018)\", \"scale(1)\"]\n    : \"scale(1)\";\n\n  return (\n    <AnimatePresence initial={false}>\n      {present ? (\n        <motion.div\n          className={className}\n          style={{ transformOrigin: origin }}\n          initial={reduceMotion ? { opacity: 0 } : { opacity: 0, transform: initial }}\n          animate={{ opacity: 1, transform: reduceMotion ? \"scale(1)\" : animate }}\n          exit={{ opacity: 0, transform: reduceMotion ? \"scale(1)\" : initial }}\n          transition={reduceMotion ? { duration: 0.12 } : { duration, delay, ease: easing }}\n        >\n          {children}\n        </motion.div>\n      ) : null}\n    </AnimatePresence>\n  );\n}\n"
    }
  ]
}
