{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "staggered-fade-up",
  "title": "Staggered Fade Up",
  "description": "Words fade in and slide up one after another with a configurable delay.",
  "dependencies": ["remotion"],
  "files": [
    {
      "path": "registry/remocn/staggered-fade-up/index.tsx",
      "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface StaggeredFadeUpProps {\n  text: string;\n  staggerDelay?: number;\n  distance?: number;\n  fontSize?: number;\n  color?: string;\n  fontWeight?: number;\n  speed?: number;\n  className?: string;\n}\n\nexport function StaggeredFadeUp({\n  text,\n  staggerDelay = 4,\n  distance = 20,\n  fontSize = 72,\n  color = \"#171717\",\n  fontWeight = 600,\n  speed = 1,\n  className,\n}: StaggeredFadeUpProps) {\n  const frame = useCurrentFrame() * speed;\n\n  const words = text.split(\" \");\n\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        background: \"white\",\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, 12], [0, 1], {\n            extrapolateLeft: \"clamp\",\n            extrapolateRight: \"clamp\",\n          });\n          const y = interpolate(local, [0, 12], [distance, 0], {\n            extrapolateLeft: \"clamp\",\n            extrapolateRight: \"clamp\",\n          });\n          return (\n            <span\n              key={i}\n              style={{\n                display: \"inline-block\",\n                marginRight: \"0.25em\",\n                opacity,\n                translate: `0 ${y}px`,\n              }}\n            >\n              {word}\n            </span>\n          );\n        })}\n      </span>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/staggered-fade-up.tsx"
    }
  ],
  "type": "registry:component"
}
