ScrambleText

Text decodes from noise into place, again on every hover. Text.

Open playground

About

ScrambleText is a React component in the Text category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ScrambleText } from "@ashutoshswamy/smoui" and set text, duration, chars among its 4 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { ScrambleText } from "@ashutoshswamy/smoui";

<ScrambleText text="Signal from noise" className="text-3xl font-semibold" />

Props 4

text

Final text.

string
duration

Seconds to resolve.

numberdefault 0.9
chars

Characters used as noise.

stringdefault A-Z 0-9 # % &
replayOnHover

Re-run on pointer enter.

booleandefault true