Text Hover Effect
- Source
- Aceternity UI ↗
- Author
- Aceternity UI
- Licence
- Aceternity UI licence (free component)
Loading…
Outlined letters draw themselves in, and a gradient spotlight follows the pointer across them.
Code
"use client";
import { TextHoverEffect } from "@/lab/aceternity/ui/text-hover-effect";
export default function TextHoverEffectDemo() {
return (
<div className="relative flex h-full w-full items-center justify-center">
<TextHoverEffect text="ACET" />
</div>
);
}
Prompt
Build "Text Hover Effect", a text animation. What it does: Outlined letters draw themselves in, and a gradient spotlight follows the pointer across them. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using motion. Technique: the Motion library, inline SVG, pointer tracking. It sits on a dark background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://ui.aceternity.com/components/text-hover-effect (Aceternity UI, Aceternity UI licence (free component)).