Daniel Petho

Scramble Hover

Text 180

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.5K
  • Image Trail

    Image Trail

    1.4K
  • Animated Gradient With SVG

    Animated Gradient With SVG

    897
  • Text Cursor Proximity

    Text Cursor Proximity

    797
  • Pixel Trail

    Pixel Trail

    653

More in Text

View all
  • Motion Blur Text

    Motion Blur Text

    45
  • Rainbow Text Effect

    Rainbow Text Effect

    58
  • Text Reveal

    Text Reveal

    29
  • Blur Reveal

    Blur Reveal

    73
  • Short Slide Down

    Short Slide Down

    45
  • Apple Hello Effect

    Apple Hello Effect

    659
  • Scroll Fill Headline

    Scroll Fill Headline

    14
  • Blur Reveal

    Blur Reveal

    364