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-lock",
"title": "Lock",
"description": "Animated Lucide lock icon — the body draws on, then the shackle lifts and slams shut with a confirming pop.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-lock/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 \"M5 11H19A2 2 0 0 1 21 13V20A2 2 0 0 1 19 22H5A2 2 0 0 1 3 20V13A2 2 0 0 1 5 11Z\";\nconst SHACKLE_PATH = \"M7 11V7a5 5 0 0 1 10 0v4\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nexport function LockIcon({\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 const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shackleDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const lift = acting\n ? interpolate(actionProgress, [0, 0.35, 0.7], [0, -2.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.in(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.7, 0.85, 1], [1, 1.05, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const shackle = drawnPathProps(SHACKLE_PATH, shackleDraw);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\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={`translate(0 ${lift})`}>\n <path\n d={SHACKLE_PATH}\n strokeDasharray={shackle.strokeDasharray}\n strokeDashoffset={shackle.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nexport function LockIconStatic({\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 <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n <path d={SHACKLE_PATH} />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-lock.tsx"
}
],
"type": "registry:component"
}