File size: 763 Bytes
1a7ee60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use client'

import { motion } from 'framer-motion'
import { cn } from '@/lib/utils'

interface GradientTextProps {
    children: React.ReactNode
    className?: string
}

export default function GradientText({ children, className }: GradientTextProps) {
    return (
        <motion.span
            initial={{ backgroundPosition: '0% 50%' }}
            animate={{ backgroundPosition: '100% 50%' }}
            transition={{ duration: 5, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
            className={cn(
                "bg-clip-text text-transparent bg-gradient-to-r from-indigo-600 via-purple-600 to-cyan-600 bg-[length:200%_auto]",
                className
            )}
        >
            {children}
        </motion.span>
    )
}