Kinetik UI

Scramble Text

.md

Characters cycle through random glyphs and lock into place from left to right.

v1.0.0Live on web
Component preview

Installation

Kinetik CLI
npx kinetik-ui add scramble-text

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/scramble-text.json

Install manually

  1. Copy the source files
    • components/kinetik/scramble-text.tsx
    View source files

Usage

import { ScrambleText } from '@/components/kinetik/scramble-text';

<ScrambleText text="KINETIK" style={{ fontSize: 48, fontWeight: '800' }} />;

The effect plays on mount and whenever text changes. Change replayKey to replay it with the same text.

When to use

  • Headlines, codes and status labels that change: a build number, a reveal, a mode switch.
  • Monospace or uppercase text, where the cycling glyphs keep a steady rhythm.

When not to use

  • Paragraphs. Scrambled body text is unreadable and long strings wrap unpredictably while cycling.
  • Text the user is trying to read while it changes, such as prices during checkout.

Notes

  • The settled text sizes the component, so scrambling never shifts the layout around it.
  • While scrambling, one Text re-renders about 18 times a second; when every character has settled the timer stops. This is deliberate: driving a TextInput's text from the UI thread every frame chains text-input states on Android's New Architecture and can crash a long-running screen.
  • Screen readers get the final text immediately.

Props

ScrambleTextProps

PropTypeDefaultDescription
textrequiredstring—The text to settle on. Changing it scrambles again.
durationnumber900Time in ms for all characters to settle. Defaults to 900.
delaynumber0Wait before the first character settles, in ms. Defaults to 0.
glyphsstringSCRAMBLE_GLYPHSGlyphs used while scrambling.
replayKeystring | number—Change this value to replay the effect with the same text.
animateOnMountbooleantrueScramble on first render. Defaults to true.
onDone() => void—Called when every character has settled.
styleStyleProp<TextStyle>—
containerStyleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Re-renders one Text at ~18 Hz for `duration` ms, then stops. Deliberately not driven per frame through a TextInput: on Android Fabric that chains text-input states and can crash.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.85× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 155 MB app memory. Frames at rest in the measurement came from the demo cycling words; the effect stops once the text settles.

Real-device measurement pending.

Accessibility

Reduced motion
Shows the final text immediately.
Screen readers
Exposed as a single text element with the final string; the scrambling glyphs are hidden.
Touch target
Not interactive.

Source files

components/kinetik/scramble-text.tsx is in the Code tab of the preview above.