{
  "name": "bars-bounce-default",
  "type": "registry:ui",
  "tier": "free",
  "dependencies": [
    "framer-motion"
  ],
  "registryDependencies": [
    "https://www.craftui.space/r/craftui-base.json"
  ],
  "files": [
    {
      "path": "components/craftui/loaders/bars-bounce/default.tsx",
      "content": "'use client';\n\nimport { useEffect } from 'react';\nimport { motion, useAnimation } from 'motion/react';\n\ninterface BarsBounceProps {\n  width?: number;\n  height?: number;\n  color?: string;\n  barWidth?: number;\n  gap?: number;\n  isAnimating?: boolean;\n  duration?: number;\n  ease?: any;\n}\n\nexport function BarsBounce({\n  width = 45,\n  height = 45,\n  color = \"currentColor\",\n  barWidth = 9,\n  gap = 9,\n  isAnimating = true,\n  duration = 1.0,\n  ease = 'easeInOut',\n}: BarsBounceProps) {\n  const bars = [\n    { x: 0 },\n    { x: barWidth + gap },\n    { x: (barWidth + gap) * 2 }\n  ];\n\n  // Height animation: 100% -> 40% -> 100%\n  const tallHeight = height;\n  const shortHeight = height * 0.4;\n\n  const controls = useAnimation();\n\n  useEffect(() => {\n    if (isAnimating) {\n      controls.start((i) => {\n        const isFirstOrLast = i === 0 || i === 2;\n        return {\n          height: [tallHeight, shortHeight, tallHeight],\n          y: isFirstOrLast\n            ? [0, height - shortHeight, height - tallHeight]\n            : [height - tallHeight, 0, height - tallHeight],\n          transition: { duration, repeat: Infinity, ease, times: [0, 0.5, 1] },\n        };\n      });\n    } else {\n      controls.stop();\n      controls.set((i) => {\n        const isFirstOrLast = i === 0 || i === 2;\n        return {\n          height: tallHeight,\n          y: isFirstOrLast ? 0 : height - tallHeight,\n        };\n      });\n    }\n  }, [isAnimating, duration, ease, tallHeight, shortHeight, height, controls]);\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    >\n      {bars.map((bar, index) => {\n        const isFirstOrLast = index === 0 || index === 2;\n        return (\n          <motion.rect\n            key={index}\n            x={bar.x}\n            width={barWidth}\n            fill={color}\n            custom={index}\n            initial={{\n              height: tallHeight,\n              y: isFirstOrLast ? 0 : height - tallHeight,\n            }}\n            animate={controls}\n          />\n        );\n      })}\n    </svg>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/craftui/loaders/bars-bounce/default.tsx"
    }
  ],
  "meta": {
    "displayName": "Bars Bounce - Bars Bounce",
    "description": "Three bars that synchronously change height while bouncing between top and bottom positions",
    "category": "loaders",
    "tags": [
      "bars",
      "loading",
      "bounce",
      "vertical",
      "synchronized"
    ],
    "animationType": "loop"
  }
}