AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
'use client';
import type { Variants } from 'motion/react';
import { motion, useAnimation } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { cn } from '@/lib/utils';
export interface UserRoundPlusIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface UserRoundPlusIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const VERTICAL_BAR_VARIANTS: Variants = {
normal: {
opacity: 1,
},
animate: {
opacity: [0, 1],
pathLength: [0, 1],
transition: {
delay: 0.3,
duration: 0.2,
opacity: { duration: 0.1, delay: 0.3 },
},
},
};
const HORIZONTAL_BAR_VARIANTS: Variants = {
normal: {
opacity: 1,
},
animate: {
opacity: [0, 1],
pathLength: [0, 1],
transition: {
delay: 0.6,
duration: 0.2,
opacity: { duration: 0.1, delay: 0.6 },
},
},
};
const UserRoundPlusIcon = forwardRef<
UserRoundPlusIconHandle,
UserRoundPlusIconProps
>(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (isControlledRef.current) {
onMouseEnter?.(e);
} else {
controls.start('animate');
}
},
[controls, onMouseEnter],
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (isControlledRef.current) {
onMouseLeave?.(e);
} else {
controls.start('normal');
}
},
[controls, onMouseLeave],
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<motion.svg
fill="none"
height={size}
initial="normal"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
>
<path d="M2 21a8 8 0 0 1 13.292-6" />
<circle cx="10" cy="8" r="5" />
<motion.path
animate={controls}
d="M19 16v6"
initial="normal"
variants={VERTICAL_BAR_VARIANTS}
/>
<motion.path
animate={controls}
d="M22 19h-6"
initial="normal"
variants={HORIZONTAL_BAR_VARIANTS}
/>
</motion.svg>
</div>
);
});
UserRoundPlusIcon.displayName = 'UserRoundPlusIcon';
export { UserRoundPlusIcon };