diff --git a/src/components/HomeHeadline.tsx b/src/components/HomeHeadline.tsx new file mode 100644 index 0000000..8edefa7 --- /dev/null +++ b/src/components/HomeHeadline.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import { TextHoverEffect } from "@/components/ui/text-hover-effect"; + +export function HomeHeadline() { + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/components/ui/text-hover-effect.tsx b/src/components/ui/text-hover-effect.tsx new file mode 100644 index 0000000..f69db5d --- /dev/null +++ b/src/components/ui/text-hover-effect.tsx @@ -0,0 +1,141 @@ +"use client"; +import React, { useRef, useEffect, useState } from "react"; +import { motion, useAnimation } from "motion/react"; + +export const TextHoverEffect = ({ + text, + duration = 6, // loop duration +}: { + text: string; + duration?: number; +}) => { + const svgRef = useRef(null); + const controls = useAnimation(); + const [cursor, setCursor] = useState({ x: 0, y: 0 }); + const [hovered, setHovered] = useState(false); + + // ✅ Animate mask looping automatically + useEffect(() => { + const loop = async () => { + while (true) { + await controls.start({ + cx: ["20%", "80%", "50%"], + cy: ["20%", "80%", "50%"], + transition: { + duration, + ease: "easeInOut", + repeat: 0, + }, + }); + } + }; + loop(); + }, [controls, duration]); + + return ( + setHovered(true)} + onMouseLeave={() => setHovered(false)} + onMouseMove={(e) => setCursor({ x: e.clientX, y: e.clientY })} + className="select-none" + > + + {/* ✅ Softer cyan gradient */} + + {hovered ? ( + <> + + + + + + ) : ( + <> + + + + )} + + + {/* ✅ Mask with autoplay motion */} + + + + + + {/* ✅ Glow */} + + + + + + + + + + + + + + {/* ✅ Background faint stroke */} + + {text} + + + {/* ✅ Line drawing animation always plays too */} + + {text} + + + {/* ✅ Final filled glowing cyan text (mask reveals it) */} + + {text} + + + ); +}; diff --git a/src/pages/home/HomeBlink.tsx b/src/pages/home/HomeBlink.tsx index c637e11..8b740d0 100644 --- a/src/pages/home/HomeBlink.tsx +++ b/src/pages/home/HomeBlink.tsx @@ -2,30 +2,26 @@ import { Button } from "@/components/Button"; import { Spotlight } from "@/components/ui/spotlight"; -import { GridBlink } from "@/components/ui/GridBlink"; import { H1, H4, H5 } from "@/components/Texts"; +import { HomeHeadline } from "@/components/HomeHeadline"; export function HomeBlink({ onGetStartedClick }: { onGetStartedClick: () => void }) { return (
- {/* ✅ Animated blinking grid */} - - - {/* ✅ Cyan Radial Glow */}
-

- MYCELIUM -

-

The Living Network of the Next Internet

+ +

The Living Network of the Next Internet

A new internet is emerging — private, distributed, and self-sovereign.