{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "primitive-idle-animation",
  "type": "registry:ui",
  "title": "Idle animation",
  "description": "Use subtle breathing or floating motion for available, waiting, or active states.",
  "dependencies": [
    "motion"
  ],
  "categories": [
    "primitive",
    "loops"
  ],
  "docs": "https://motion-lexicon.pages.dev/en/primitives/idle-animation/",
  "files": [
    {
      "path": "src/registry/primitives/idle-animation.tsx",
      "type": "registry:ui",
      "target": "components/motion-lexicon/primitives/idle-animation.tsx",
      "content": "\"use client\";\n\nimport { motion, useReducedMotion } from \"motion/react\";\nimport type { ReactNode } from \"react\";\n\nexport type IdleStyle = \"float\" | \"pulse\";\n\nexport type IdleAnimationPrimitiveProps = {\n  children: ReactNode;\n  style?: IdleStyle;\n  distance?: number;\n  duration?: number;\n  pause?: number;\n  className?: string;\n};\n\nexport function IdleAnimationPrimitive({\n  children,\n  style = \"float\",\n  distance = 8,\n  duration = 2.2,\n  pause = 0.3,\n  className,\n}: IdleAnimationPrimitiveProps) {\n  const reduceMotion = useReducedMotion();\n  const transform = style === \"pulse\"\n    ? [\"scale(1)\", \"scale(1.035)\", \"scale(1)\"]\n    : [\"translate3d(0, 0, 0)\", `translate3d(0, ${-distance}px, 0)`, \"translate3d(0, 0, 0)\"];\n\n  return (\n    <motion.div\n      className={className}\n      animate={reduceMotion ? { opacity: 1 } : { transform }}\n      transition={{ duration, ease: [0.65, 0, 0.35, 1], repeat: reduceMotion ? 0 : Infinity, repeatDelay: pause }}\n    >\n      {children}\n    </motion.div>\n  );\n}\n"
    }
  ]
}
