Scramble Text

Text that decodes itself on scroll-in and on hover.

gsapMIT · free
SYSTEM ONLINE
HOVER ME
ACCESS GRANTED
DEPLOYING

Installation

npx shadcn@latest add https://ombakui.com/r/scramble-text.json

Usage

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

<ScrambleText text="SYSTEM ONLINE" trigger="both" />

Props

PropTypeDefaultDescription
text*string–The final text.
asElementType"span"HTML tag to render.
trigger"view" | "hover" | "both""both"Scramble when entering the viewport, on hover, or both.
charsstringuppercase letters and digitsCharacters shown while scrambling.
durationnumber1Seconds.
classNamestring–