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-plus",
"title": "Plus",
"description": "Animated Lucide plus icon — the two strokes draw on, then the mark twirls 90deg with a scale pop for an energetic add or create beat.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-plus/index.tsx",
"content": "\"use client\";\n\nimport { Easing, interpolate, spring, useVideoConfig } from \"remotion\";\nimport {\n drawnPathProps,\n type IconAnimationProps,\n useIconAnimation,\n} from \"@/lib/remocn-icons\";\n\nconst HORIZONTAL_PATH = \"M5 12h14\";\nconst VERTICAL_PATH = \"M12 5v14\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nexport function PlusIcon({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame, actionProgress } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const horizontalProgress = interpolate(linearDraw, [0, 0.571], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const verticalProgress = interpolate(linearDraw, [0.286, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const horizontal = drawnPathProps(HORIZONTAL_PATH, horizontalProgress);\n const vertical = drawnPathProps(VERTICAL_PATH, verticalProgress);\n\n const rotate =\n 90 *\n spring({\n frame: actionFrame,\n fps,\n config: { damping: 14, stiffness: 130, mass: 0.8 },\n durationInFrames: 16,\n });\n const pop = interpolate(actionProgress, [0, 0.5, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.15 * 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: `rotate(${rotate}deg) scale(${scale})`,\n }}\n >\n <path\n d={HORIZONTAL_PATH}\n strokeDasharray={horizontal.strokeDasharray}\n strokeDashoffset={horizontal.strokeDashoffset}\n />\n <path\n d={VERTICAL_PATH}\n strokeDasharray={vertical.strokeDasharray}\n strokeDashoffset={vertical.strokeDashoffset}\n />\n </svg>\n );\n}\n\nexport function PlusIconStatic({\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={HORIZONTAL_PATH} />\n <path d={VERTICAL_PATH} />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-plus.tsx"
}
],
"type": "registry:component"
}