# useScramble

> 1 KB React hook that scrambles text through random characters before settling (decrypt effect).

Source: https://tastebase.ehsanulsiam.workers.dev/browse/use-scramble

free

1 KB React hook that scrambles text through random characters before settling (decrypt effect).

by Tolis Christodoulou[GitHub](https://github.com/tol-is/use-scramble)[npm](https://npmjs.com/package/use-scramble)

[visit](https://use-scramble.dev/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://use-scramble.dev](https://use-scramble.dev/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [GSAP](https://tastebase.ehsanulsiam.workers.dev/browse/gsap)

Timeline animation engine with ScrollTrigger, SplitText, Flip and MorphSVG, now free including every plugin.

no preview

### [Torph](https://tastebase.ehsanulsiam.workers.dev/browse/torph)

Animated text morphing: labels change letter by letter instead of swapping.

no preview

### [Vaul](https://tastebase.ehsanulsiam.workers.dev/browse/vaul)

Unstyled drawer for React that replaces dialogs on mobile: drag to dismiss, snap points, scaled background.

no preview

### [Embla Carousel](https://tastebase.ehsanulsiam.workers.dev/browse/embla-carousel)

Small, dependency-free carousel engine with great swipe physics; you bring all the markup and styles.

## Looks that pick it

[Cyberpunkfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/cyberpunk)[Sci-fi HUDfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/sci-fi-hud)[ASCIIfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/ascii)[Terminal (CRT)first pick](https://tastebase.ehsanulsiam.workers.dev/looks/terminal)[Anti-design](https://tastebase.ehsanulsiam.workers.dev/looks/anti-design)[Acid graphics](https://tastebase.ehsanulsiam.workers.dev/looks/acid)[Game UI](https://tastebase.ehsanulsiam.workers.dev/looks/game-ui)

## For your agent

##### Install

`npm i use-scramble`

##### Use it for

- a terminal or hacker-styled heading that decodes on load or hover
- a nav link that scrambles on hover in a dev-tool or cyber aesthetic
- a typewriter headline that types itself out on load (scramble: 0)

##### Skip it when

- minimal, apple, luxury or corporate looks: the effect reads as gimmicky
- anything users must read quickly (buttons, errors, data): the text is unreadable mid-animation
- you already use GSAP: its ScrambleTextPlugin does the same

##### What's inside5 free

- useScramble
- replay()
- Options (speed, tick, step, scramble, seed, chance, range, overdrive, overflow, ignore)
- Callbacks (onAnimationStart, onAnimationFrame, onAnimationEnd)
- Reduced motion

##### Facts

**Frameworks**
react

**Styling**
unstyled

**Weight**
tiny

**Accessibility**
weak

**Maturity**
stable

**License**
MIT

**Price**
Free

##### Alternatives

[GSAP](https://tastebase.ehsanulsiam.workers.dev/browse/gsap)[Torph](https://tastebase.ehsanulsiam.workers.dev/browse/torph)

[Compare useScramble with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/use-scramble-alternatives)

```
import { useScramble } from 'use-scramble'

const { ref, replay } = useScramble({ text: 'Access granted', speed: 0.6, scramble: 4 })

<h1 ref={ref} onMouseEnter={replay} aria-label="Access granted" />
```

https://use-scramble.dev

Loading website

[Visit](https://use-scramble.dev/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
