A light glare effect which pans across text making it appear as if it is shimmering.
1import { ArrowRightIcon } from "@radix-ui/react-icons";
2
3import { cn } from "@/lib/utils";
4import { AnimatedShinyText } from "@/components/magicui/animated-shiny-text";
5
6export function AnimatedShinyTextDemo() {
7 return (
8 <div className="z-10 flex min-h-64 items-center justify-center">
9 <div
10 className={cn(
11 "group rounded-full border border-black/5 bg-neutral-100 text-base text-white transition-all ease-in hover:cursor-pointer hover:bg-neutral-200 dark:border-white/5 dark:bg-neutral-900 dark:hover:bg-neutral-800",
12 )}
13 >
14 <AnimatedShinyText className="inline-flex items-center justify-center px-4 py-1 transition ease-out hover:text-neutral-600 hover:duration-300 hover:dark:text-neutral-400">
15 <span>✨ Introducing Magic UI</span>
16 <ArrowRightIcon className="ml-1 size-3 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" />
17 </AnimatedShinyText>
18 </div>
19 </div>
20 );
21}