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 { useState } from "react";

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

const statuses = ["Waiting for approval", "Building on server 3", "Running 214 tests", "Live in production"];

export default function TextScrambleStatus() {
  const [index, setIndex] = useState(0);

  return (
    <div className="flex w-full max-w-xs flex-col gap-4 rounded-xl border border-border bg-card p-5">
      <p className="text-[13px] text-muted-foreground">Release 2.4</p>
      <p role="status" className="font-mono text-sm text-foreground">
        <TextScramble characters="01<>/_=+" duration={0.6} scrambleClassName="text-muted-foreground">
          {statuses[index]}
        </TextScramble>
      </p>
      <button
        type="button"
        onClick={() => setIndex((current) => (current + 1) % statuses.length)}
        className="h-8 cursor-pointer rounded-lg border border-border px-3 text-[13px] font-medium text-foreground transition-colors outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring"
      >
        {index === statuses.length - 1 ? "Start over" : "Next step"}
      </button>
    </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