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-timer",
"title": "Timer",
"description": "Animated Lucide timer icon — draws on, then the start button clicks and the hand sweeps: the stopwatch is running.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-timer/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 DIAL_PATH = \"M12 6a8 8 0 1 0 0 16 8 8 0 1 0 0-16Z\";\nconst BUTTON_PATH = \"M10 2H14\";\nconst HAND_PATH = \"M12 14 15 11\";\n\nconst DIAL_CX = 12;\nconst DIAL_CY = 14;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 48,\n loop: false,\n} as const;\n\nexport function TimerIcon({\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 dialDraw = interpolate(linearDraw, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const buttonDraw = interpolate(linearDraw, [0.45, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const handDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const buttonDip = acting\n ? interpolate(actionProgress, [0, 0.15, 0.3], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const handSweep = acting\n ? interpolate(actionProgress, [0.3, 1], [0, 360], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.cubic),\n })\n : 0;\n\n const dial = drawnPathProps(DIAL_PATH, acting ? 1 : dialDraw);\n const button = drawnPathProps(BUTTON_PATH, acting ? 1 : buttonDraw);\n const hand = drawnPathProps(HAND_PATH, acting ? 1 : handDraw);\n\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 <path\n d={DIAL_PATH}\n strokeDasharray={dial.strokeDasharray}\n strokeDashoffset={dial.strokeDashoffset}\n />\n <g transform={`translate(0 ${buttonDip})`}>\n <path\n d={BUTTON_PATH}\n strokeDasharray={button.strokeDasharray}\n strokeDashoffset={button.strokeDashoffset}\n />\n </g>\n <g transform={`rotate(${handSweep} ${DIAL_CX} ${DIAL_CY})`}>\n <path\n d={HAND_PATH}\n strokeDasharray={hand.strokeDasharray}\n strokeDashoffset={hand.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nexport function TimerIconStatic({\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 <line x1=\"10\" x2=\"14\" y1=\"2\" y2=\"2\" />\n <line x1=\"12\" x2=\"15\" y1=\"14\" y2=\"11\" />\n <circle cx=\"12\" cy=\"14\" r=\"8\" />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-timer.tsx"
}
],
"type": "registry:component"
}