{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spring-scale-in",
  "title": "Spring Scale In",
  "description": "Words pop in with a soft overshoot scale, like a physical spring settling into place.",
  "dependencies": ["remotion"],
  "files": [
    {
      "path": "registry/remocn/spring-scale-in/index.tsx",
      "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SpringScaleInProps {\n  text: string;\n  staggerDelay?: number;\n  scaleFrom?: number;\n  fontSize?: number;\n  color?: string;\n  fontWeight?: number;\n  speed?: number;\n  className?: string;\n}\n\nexport function SpringScaleIn({\n  text,\n  staggerDelay = 3,\n  scaleFrom = 0.7,\n  fontSize = 72,\n  color = \"#171717\",\n  fontWeight = 600,\n  speed = 1,\n  className,\n}: SpringScaleInProps) {\n  const frame = useCurrentFrame() * speed;\n\n  const words = text.split(\" \");\n  const wordDurationFrames = 11;\n  const easing = Easing.bezier(0.34, 1.56, 0.64, 1);\n\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        background: \"transparent\",\n      }}\n    >\n      <span\n        className={className}\n        style={{\n          fontSize,\n          fontWeight,\n          color,\n          letterSpacing: \"-0.03em\",\n          fontFamily:\n            \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n        }}\n      >\n        {words.map((word, i) => {\n          const local = frame - i * staggerDelay;\n          const opacity = interpolate(local, [0, wordDurationFrames], [0, 1], {\n            extrapolateLeft: \"clamp\",\n            extrapolateRight: \"clamp\",\n            easing,\n          });\n          const scale = interpolate(\n            local,\n            [0, wordDurationFrames],\n            [scaleFrom, 1],\n            {\n              extrapolateLeft: \"clamp\",\n              extrapolateRight: \"clamp\",\n              easing,\n            },\n          );\n          return (\n            <span\n              key={i}\n              style={{\n                display: \"inline-block\",\n                marginRight: \"0.25em\",\n                transformOrigin: \"50% 50%\",\n                opacity,\n                scale: `${scale}`,\n              }}\n            >\n              {word}\n            </span>\n          );\n        })}\n      </span>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/spring-scale-in.tsx"
    }
  ],
  "type": "registry:component"
}
