34 lines
714 B
TypeScript
34 lines
714 B
TypeScript
"use client";
|
|
|
|
import { motion } from "motion/react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
interface AuroraTextProps {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export function AuroraText({ children, className }: AuroraTextProps) {
|
|
return (
|
|
<motion.span
|
|
className={cn(
|
|
"bg-gradient-to-r from-blue-400 via-cyan-500 to-blue-500 bg-clip-text text-transparent",
|
|
className,
|
|
)}
|
|
animate={{
|
|
backgroundPosition: ["0% 50%", "100% 50%", "0% 50%"],
|
|
}}
|
|
transition={{
|
|
duration: 3,
|
|
repeat: Infinity,
|
|
ease: "linear",
|
|
}}
|
|
style={{
|
|
backgroundSize: "200% 200%",
|
|
}}
|
|
>
|
|
{children}
|
|
</motion.span>
|
|
);
|
|
}
|