← Components/Marketing & Lead Gen

GradientText

gradienttext-1779388705683.tsx
'use client';
import { useEffect, useRef } from 'react';

export default function GradientText({ text = "Build something amazing", size = "48px" }) {
  const ref = useRef(null);

  useEffect(() => {
    let angle = 0;
    const frame = () => {
      angle = (angle + 0.5) % 360;
      if (ref.current) {
        ref.current.style.backgroundImage = `linear-gradient(${angle}deg, #C9A84C, #6366f1, #C9A84C, #e8c96d)`;
      }
      requestAnimationFrame(frame);
    };
    const id = requestAnimationFrame(frame);
    return () => cancelAnimationFrame(id);
  }, []);

  return (
    <h1
      ref={ref}
      style={{
        fontSize: size,
        fontWeight: 900,
        fontFamily: 'system-ui, sans-serif',
        backgroundImage: 'linear-gradient(135deg, #C9A84C, #6366f1)',
        backgroundSize: '200% 200%',
        WebkitBackgroundClip: 'text',
        WebkitTextFillColor: 'transparent',
        backgroundClip: 'text',
        margin: 0,
        lineHeight: 1.2,
        letterSpacing: '-0.02em',
      }}
    >
      {text}
    </h1>
  );
}

Component info

CategoryMarketing & Lead Gen
Frameworkreact
TierFREE
Views0
Copies0

About

Animated gradient text with shimmer effect

More from Marketing & Lead Gen

'use client'
import { useEffect, useState } from 'react'

const avatars = ['👨‍💻','👩‍💻','🧑‍💼','👨‍🎨','👩‍🎨','🧑‍💻','👨‍💼','👩‍💼']
const companies = ['Stripe', 'Vercel', 'Linear', 'Notion', 'Figma', 'Github']
const badges = [
  { icon: '🔒',
SocialProof
Marketing & Lead Gen
'use client'
import { useState } from 'react'

const FEATURES = [
  { label: 'Component count', empire: '120+', shadcn: '48', headless: '23+', magic: '50+' },
  { label: 'AI-generated', empire: true, shadcn: false, headless: false, magic: false },
  
FeatureComparison
Marketing & Lead Gen