unlumen

Unlumen Scramble Text

Text

About

Animated text reveal with a randomized character scramble effect from Unlumen UI.

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

Code

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

Usage.tsx

"use client";

import { useEffect, useRef, useState } from "react";

import {
  ScrambleText,
  ScrambleTextHandle,
} from "@/components/ui/unlumen-scramble-text";

const CHAOS_VERBS = [
  "Asking the rubber duck",
  "Flipping the table",
  "Yelling into the void",
  "Performing dark rituals",
  "Sacrificing a semicolon",
  "Consulting the Magic 8-Ball",
  "Rolling for initiative",
  "Blaming cosmic rays",
  "Summoning Cthulhu",
  "Dividing by zero",
  "Feeding the chaos monkey",
  "Releasing the kraken",
  "Rearranging deck chairs on the Titanic",
  "Poking the bear",
  "Opening Pandora's box",
  "Unplugging and plugging back in",
  "Smashing the keyboard",
  "Consulting the ouija board",
  "Generating random numbers by rolling dice",
  "Letting the intrusive thoughts win",
  "Stack-overflowing the stack overflow",
  "Applying percussive maintenance",
  "Crossing the streams",
  "Playing Russian roulette with git force push",
  "Turning the chaos up to eleven",
  "Invoking Murphy's Law",
  "Ignoring all the red flags",
  "Vibing with the segfault",
  "Tempting fate",
  "Gazing upon forbidden knowledge",
  "Questioning all life choices",
  "Embracing the entropy",
  "Hitting random buttons",
  "Trusting the process (blindly)",
  "Entering the danger zone",
];

export function ScrambleTextDemo() {
  const [currentIndex, setCurrentIndex] = useState(0);
  const [key, setKey] = useState(0);
  const ref = useRef<ScrambleTextHandle>(null);

  useEffect(() => {
    const interval = setInterval(() => {
      setCurrentIndex((prev) => (prev + 1) % CHAOS_VERBS.length);
      setKey((k) => k + 1);
    }, 2000);

    return () => clearInterval(interval);
  }, []);

  return (
    <div className="flex items-center justify-center py-12 px-4">
      <div className="text-center">
        <p className="text-xl font-mono  tracking-tight">
          <ScrambleText
            key={key}
            ref={ref}
            text={CHAOS_VERBS[currentIndex]}
            scrambledClassName="text-[#E07947]"
            scrambleSpeed={30}
          />
        </p>
      </div>
    </div>
  );
}
export default ScrambleTextDemo;

More by unlumen

View all
  • Motion Navigation Menu

    Motion Navigation Menu

    304
  • Side By Side Slide

    Side By Side Slide

    276
  • Scroll Reveal Image

    Scroll Reveal Image

    241
  • Count Up

    Count Up

    173
  • Pixel Liquid Background

    Pixel Liquid Background

    122
  • Animated Sidebar

    Animated Sidebar

    114
  • Glow Button

    Glow Button

    109
  • Horizontal Depth Fade

    Horizontal Depth Fade

    90

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