Kinetic UI
Back to Introduction
Text Effects

Text Scramble

A hacker-style text reveal animation that cycles through random characters before settling on the target text.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add text-scramble

The TextScramble component animates text into view by rapidly cycling through a set of randomized characters. It creates a classic "cyberpunk" or "decoding" effect. Now updated with 4 pre-configured character sets and better re-triggering logic.

Live Preview

Text Scramble

Cyberpunk:Standard alphanumeric and symbol character set for a classic tech feel.

Installation

npx kinetic-ui-cli@latest add text-scramble

Custom Triggers

You can use the trigger prop in combination with state to re-run the animation when a user interacts with an element.

import { useState } from 'react';
import { TextScramble } from '@/components/creative/text-scramble';

export function HoverScramble() {
  const [isHovered, setIsHovered] = useState(false);

  return (
    <button 
      onMouseEnter={() => setIsHovered(true)}
      onMouseLeave={() => setIsHovered(false)}
    >
      <TextScramble 
        text="Hover Me" 
        trigger={isHovered} 
      />
    </button>
  );
}

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

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

2. Implementation Example

Render the component and customize its behavior by passing props:

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

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <TextScramble
        text="example"
        speed{10}
        delay{10}
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.