All components

Wavy Text

Wavy Text is a React and Tailwind CSS text component from Eldora UI, licensed MIT. Copy it and paste it into your project.

Eldora UI MIT text

What it is

Wavy Text is a React and Tailwind CSS text component from Eldora UI, licensed MIT. Copy it and paste it into your project.

How to use it

Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.

Open in the catalogue

Five free copies a month. No card.

Needs

npm i motion react clsx

Licence

This component comes from Eldora UI and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.

Wavy Text

registry/eldoraui/wavy-text.tsx
"use client"

import clsx from "clsx"
import { AnimatePresence, motion } from "motion/react"

interface WavyTextProps {
  text?: string
  className?: string
}

export const WavyText: React.FC<WavyTextProps> = ({
  text = "",
  className = "",
}) => {
  const variants1 = {
    hidden: { y: 10 },
    visible: { y: -10 },
  }

  return (
    <div className={clsx("flex justify-center space-x-2", className)}>
      <AnimatePresence>
        {text.split("").map((char, i) => (
          <motion.h1
            key={i}
            initial="hidden"
            animate="visible"
            exit="hidden"
            variants={variants1}
            transition={{
              repeat: Infinity,
              repeatType: "reverse",
              duration: 0.5,
              delay: i * 0.2,
            }}
            className={clsx(
              "font-display text-center font-bold drop-shadow-sm",
              "text-4xl md:text-5xl lg:text-6xl xl:text-7xl",
              "tracking-[-0.02em]",
              "md:leading-[4rem] lg:leading-[4.5rem] xl:leading-[5rem]"
            )}
          >
            {char}
          </motion.h1>
        ))}
      </AnimatePresence>
    </div>
  )
}

Similar components