Daniel Petho

Scramble Hover

Text 178

About

A text component that scrambles the text on hover. For the scrambling effect, you can use either the original characters, or another set of characters specified in the characters prop.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scramble Hover to your project and fits it to your theme.

Code

How Scramble Hover is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { ScrambleHover } from "@/components/ui/scramble-hover"

function Preview() {
  return (
    <div className="w-full h-full  text-xl sm:text-3xl md:text-5xl bg-background font-normal overflow-hidden p-12 sm:p-20 flex flex-col md:p-24 space-y-2 space-x-6">
      <ScrambleHover
        text={"original characters"}
        scrambleSpeed={50}
        maxIterations={8}
        useOriginalCharsOnly={true}
        className="cursor-pointer"
      />
      <ScrambleHover
        text={"new characters"}
        scrambleSpeed={50}
        maxIterations={8}
        useOriginalCharsOnly={false}
        className="cursor-pointer"
        characters="abcdefghijklmnopqrstuvwxyz!@#$%^&*()_+-=[]{}|;':\,./<>?"
      />
    </div>
  )
}

export { Preview }

Dependencies

More by Daniel Petho

View all
  • Parallax Floating

    Parallax Floating

    2.3K
  • Text Rotate

    Text Rotate

    2.1K
  • Typewriter

    Typewriter

    1.9K
  • Marquee Along SVG Path

    Marquee Along SVG Path

    1.4K
  • Image Trail

    Image Trail

    1.4K
  • Animated Gradient With SVG

    Animated Gradient With SVG

    887
  • Text Cursor Proximity

    Text Cursor Proximity

    784
  • Pixel Trail

    Pixel Trail

    644

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    110
  • Blur Reveal

    Blur Reveal

    313
  • Vapour Text Effect

    Vapour Text Effect

    2K
  • NeonRGBTextEffect

    NeonRGBTextEffect

    145
  • Rainbow Text Effect

    Rainbow Text Effect

    47
  • Shine Border

    Shine Border

    968
  • Apple Hello Effect

    Apple Hello Effect

    620
  • Text Highlight

    Text Highlight

    72