Stroke logo loader
An abstract symbol that draws itself line by line, then undraws, over a faint outline of the full shape.
Settings
Code
import { motion } from "framer-motion";
const LOGO_PATH = "M18 77 42 20l14 34 12-25 16 48M30 59h48";
interface StrokeLogoLoaderProps {
color?: string;
size?: number;
/** Segundos que tarda en dibujarse el trazo. */
speed?: number;
}
export default function StrokeLogoLoader({
color = "#0071e3",
size = 100,
speed = 1.8,
}: StrokeLogoLoaderProps) {
return (
<svg
width={size}
height={size}
viewBox="0 0 100 100"
role="img"
aria-label="Animated abstract symbol"
>
{/* Trazo guía: mantiene el símbolo visible mientras se dibuja */}
<path
d={LOGO_PATH}
fill="none"
className="stroke-black/15 dark:stroke-white/20"
strokeWidth="6"
strokeLinecap="round"
strokeLinejoin="round"
/>
<motion.path
d={LOGO_PATH}
fill="none"
stroke={color}
strokeWidth="6"
strokeLinecap="round"
strokeLinejoin="round"
initial={{ pathLength: 0, opacity: 0.2 }}
animate={{ pathLength: 1, opacity: 1 }}
transition={{
duration: speed,
repeat: Infinity,
repeatType: "reverse",
ease: "easeInOut",
}}
/>
</svg>
);
}
Prompt for AI
Paste it into ChatGPT, Claude or Cursor and it will adapt the block to your project with these settings, even if you don’t use React.
More in Loaders
Where to use it
A logo that draws itself makes a lovely splash screen for a brand: the first seconds of a studio’s portfolio, the opening of a restaurant app or the wait while a SaaS dashboard boots. This SVG logo animation uses a simple abstract mark, and a faint guide stroke keeps the whole shape visible while the line travels.
The real win is swapping the path for your own logo. Single-line marks and outlined icons work best; filled logos with lots of small pieces lose the effect. Keep it for the first load, not every page change.