honestui

Text Scramble

Component

About

Short text that scrambles through random characters and settles from left to right.

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

Code

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

Usage.tsx

"use client";

import { RotateCcw } from "honestui/icons";
import { useState } from "react";

import { TextScramble } from "@/components/ui/honest-text-scramble";

const LINKS = ["Overview", "Deployments", "Analytics", "Settings"];

export default function TextScrambleDemo() {
  const [run, setRun] = useState(0);

  return (
    <div className="flex w-full max-w-sm flex-col gap-6">
      <div className="flex items-start justify-between gap-4">
        <div className="flex flex-col gap-1">
          <span className="font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground">
            <TextScramble replayKey={run} duration={0.6}>
              Build 2026.11.26
            </TextScramble>
          </span>
          <TextScramble
            as="h3"
            replayKey={run}
            duration={1.1}
            className="text-2xl font-semibold tracking-tight text-foreground"
          >
            Deployment complete
          </TextScramble>
        </div>
        <button
          type="button"
          onClick={() => setRun((count) => count + 1)}
          className="inline-flex h-7 shrink-0 items-center gap-1 rounded-md border border-border px-2 text-xs font-medium text-foreground transition-colors hover:bg-muted"
        >
          <RotateCcw className="size-3.5" />
          Replay
        </button>
      </div>
      <nav aria-label="Project" className="flex flex-wrap gap-x-5 gap-y-2 border-t border-border pt-4">
        {LINKS.map((link) => (
          <a
            key={link}
            href={`#${link.toLowerCase()}`}
            className="font-mono text-[13px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:text-foreground"
          >
            <TextScramble trigger="hover" duration={0.45} characters="01#/<>_=">
              {link}
            </TextScramble>
          </a>
        ))}
      </nav>
    </div>
  );
}

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    31
  • Warp

    Warp

    1
  • Morphing Dialog

    Morphing Dialog

    1
  • Scroll Velocity Text

    Scroll Velocity Text

    1
  • Spotlight

    Spotlight

    1
  • Typewriter

    Typewriter

    1
  • Schedule Builder

    Schedule Builder

  • Audit Log

    Audit Log