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-menu",
"title": "Menu",
"description": "Animated Lucide menu icon — the three bars slide in from the left, top to bottom, each overshooting into place.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-menu/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 TOP_PATH = \"M4 5 20 5\";\nconst MID_PATH = \"M4 12 20 12\";\nconst BOT_PATH = \"M4 19 20 19\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nconst BARS = [\n { path: TOP_PATH, drawWindow: [0, 0.5], stagger: 0 },\n { path: MID_PATH, drawWindow: [0.25, 0.75], stagger: 0.18 },\n { path: BOT_PATH, drawWindow: [0.5, 1], stagger: 0.36 },\n] as const;\n\nexport function MenuIcon({\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 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 {BARS.map((bar) => {\n const drawn = interpolate(linearDraw, [...bar.drawWindow], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dash = drawnPathProps(bar.path, drawn);\n const slide = acting\n ? interpolate(\n actionProgress,\n [bar.stagger, bar.stagger + 0.3, bar.stagger + 0.55],\n [-3, 2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n return (\n <g key={bar.path} transform={`translate(${slide} 0)`}>\n <path\n d={bar.path}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n );\n })}\n </svg>\n );\n}\n\nexport function MenuIconStatic({\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={TOP_PATH} />\n <path d={MID_PATH} />\n <path d={BOT_PATH} />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-menu.tsx"
}
],
"type": "registry:component"
}