Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "icon-arrow-left",
"title": "Arrow Left",
"description": "Animated Lucide arrow-left icon — the shaft and head draw on, then the arrow nudges back for back navigation or 'previously' callbacks.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-arrow-left/index.tsx",
"content": "\"use client\";\n\nimport { Easing, interpolate } from \"remotion\";\nimport {\n drawnPathProps,\n type IconAnimationProps,\n useIconAnimation,\n} from \"@/lib/remocn-icons\";\n\nconst SHAFT_PATH = \"M19 12H5\";\nconst HEAD_PATH = \"m12 19-7-7 7-7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nexport function ArrowLeftIcon({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const shaftProgress = interpolate(linearDraw, [0, 0.66], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const headProgress = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);\n const head = drawnPathProps(HEAD_PATH, headProgress);\n\n const outward = interpolate(actionProgress, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(2.2)),\n });\n const settle = interpolate(actionProgress, [0.5, 1], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const nudgeX = -6 * (actionProgress < 0.5 ? outward : settle);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${nudgeX} 0)`}>\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nexport function ArrowLeftIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_PATH} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-arrow-left.tsx"
}
],
"type": "registry:component"
}