🌊 Wavy Text
Make your text come alive with WavyText! ✨ This React component creates a smooth, flowing wave animation, making each letter bounce and ripple dynamically. Perfect for playful headings, animated logos, fun UI elements, and engaging website designs, this Framer Motion-powered effect adds a lively and eye-catching motion to your typography. Whether you're aiming for a fun, creative, or interactive feel, WavyText makes your words stand out with style! 🚀
Preview
Follow below steps 👇🏻
Install dependencies
1npm i framer-motion
Component
Create a file wavy-text.tsx in your components folder and paste this code
1import { motion } from 'framer-motion';2import { FC } from 'react';34type WavyTextProps = {5text: string;6className?: string;7};89const WavyText: FC<WavyTextProps> = ({ text, className }) => {10return (11<div className={`flex flex-wrap overflow-visible ${className}`}>12{text.split('').map((char, index) => (13<motion.span14key={index}15initial={{ y: '100%' }}16animate={{ y: [0, -15] }}17transition={{18duration: 0.5,19delay: index * 0.1,20ease: 'backIn',21repeat: Infinity,22repeatType: 'reverse'23}}24className="inline-block"25>26{char === ' ' ? ' ' : char}27</motion.span>28))}29</div>30);31};3233export default WavyText;
Usage
1<WavyText2text="Mahaul poora wavy!"3className="text-blue-500 text-xl sm:text-3xl md:text-4xl font-extrabold"4></WavyText>
⭐️ Got a question or feedback?
Feel free to reach out!