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-camera",
"title": "Camera",
"description": "Animated Lucide camera icon — draws on, then the lens blinks shut and open like a shutter firing.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-camera/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 BODY_PATH =\n \"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z\";\nconst LENS_PATH =\n \"M12 10 A3 3 0 0 1 15 13 A3 3 0 0 1 12 16 A3 3 0 0 1 9 13 A3 3 0 0 1 12 10\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nexport function CameraIcon({\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, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyDraw = interpolate(linearDraw, [0, 0.667], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const lensDraw = interpolate(linearDraw, [0.444, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const shutter = acting\n ? interpolate(\n actionProgress,\n [0, 0.28, 0.56, 0.78, 1],\n [1, 0.55, 1.08, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const lens = drawnPathProps(LENS_PATH, lensDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const lensTransform = `translate(${12 * (1 - shutter)} ${13 * (1 - shutter)}) scale(${shutter})`;\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 <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={lensTransform}>\n <path\n d={LENS_PATH}\n strokeDasharray={lens.strokeDasharray}\n strokeDashoffset={lens.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nexport function CameraIconStatic({\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={BODY_PATH} />\n <circle cx=\"12\" cy=\"13\" r=\"3\" />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-camera.tsx"
}
],
"type": "registry:component"
}