{
  "name": "ball-bounce-dashed-default",
  "type": "registry:ui",
  "tier": "free",
  "dependencies": [
    "framer-motion"
  ],
  "registryDependencies": [
    "https://www.craftui.space/r/craftui-base.json"
  ],
  "files": [
    {
      "path": "components/craftui/loaders/ball-bounce-dashed/default.tsx",
      "content": "'use client';\n\nimport { useEffect } from 'react';\nimport { motion, useAnimation } from 'motion/react';\n\ninterface BallBounceDashedProps {\n  width?: number;\n  height?: number;\n  color?: string;\n  lineColor?: string;\n  isAnimating?: boolean;\n  duration?: number;\n  ease?: any;\n  strokeWidth?: number;\n}\n\nexport function BallBounceDashed({\n  width = 90,\n  height = 45,\n  color = \"currentColor\",\n  lineColor = \"currentColor\",\n  isAnimating = true,\n  duration = 0.75,\n  ease = 'linear',\n  strokeWidth = 3,\n}: BallBounceDashedProps) {\n  const ballRadius = height * 0.15;\n  const ballCY = height - ballRadius - 1.5;\n  const dashLength = width * 0.5;\n\n  const controlsLine = useAnimation();\n  const controlsBall = useAnimation();\n\n  useEffect(() => {\n    if (isAnimating) {\n      controlsLine.start({\n        strokeDashoffset: [0, -width],\n        transition: { duration, repeat: Infinity, ease },\n      });\n      controlsBall.start({\n        y: [0, -height * 0.15, 0],\n        transition: { duration, repeat: Infinity, times: [0, 0.08, 1], ease: [0.455, 0.03, 0.515, 0.955] },\n      });\n    } else {\n      controlsLine.stop();\n      controlsLine.set({ strokeDashoffset: 0 });\n      controlsBall.stop();\n      controlsBall.set({ y: 0 });\n    }\n  }, [isAnimating, duration, ease, width, height, controlsLine, controlsBall]);\n\n  return (\n    <svg\n      width={width}\n      height={height}\n      viewBox={`0 0 ${width} ${height}`}\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      aria-label=\"Loading\"\n      role=\"img\"\n    >\n      {/* Animated dashed ground line */}\n      <motion.line\n        x1={0}\n        y1={height - 1.5}\n        x2={width}\n        y2={height - 1.5}\n        stroke={lineColor}\n        strokeWidth={strokeWidth}\n        strokeDasharray={`${dashLength} ${dashLength}`}\n        initial={{ strokeDashoffset: 0 }}\n        animate={controlsLine}\n      />\n      {/* Ball bounces in place */}\n      <motion.circle\n        cx={width * 0.5}\n        cy={ballCY}\n        r={ballRadius}\n        fill={color}\n        initial={{ y: 0 }}\n        animate={controlsBall}\n      />\n    </svg>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/craftui/loaders/ball-bounce-dashed/default.tsx"
    }
  ],
  "meta": {
    "displayName": "Ball Bounce Dashed - Ball Bounce Dashed",
    "description": "Ball stays centered and bounces in place while a dashed ground line scrolls underneath, creating the illusion of motion",
    "category": "loaders",
    "tags": [
      "bounce",
      "ball",
      "simple",
      "continuous",
      "animated-line",
      "dash",
      "centered"
    ],
    "animationType": "loop"
  }
}