# Decrypt Text

> Reveals a string by scrambling characters and progressively replacing scramble glyphs with the originals. Sequential reveal in three directions, or non-sequential settle after N iterations. Four trigger modes: hover, click, view, in-view + hover. Dependency-free port — signals + `setInterval`.

Source: https://ngwr.dev/animations/decrypt-text  
Kind: Animation

## Import

```angular-ts
import { WrDecryptText } from 'ngwr/decrypt-text';
```

## Playground

```html
<wr-decrypt-text
  text="Hover to decrypt!"
  [speed]="50"
  [sequential]="false"
  revealDirection="start"
  animateOn="hover"
  [useOriginalCharsOnly]="false"
/>
```

## API

| Name | Description | Type | Default |
| --- | --- | --- | --- |
| `text`required | Text to reveal. | `string` | `— (required)` |
| `speed` | Tick interval in ms. | `number` | `50` |
| `maxIterations` | Non-sequential mode only — total scramble ticks before snapping to plain. | `number` | `10` |
| `sequential` | Reveal one char per tick instead of scrambling all of them. | `boolean` | `false` |
| `revealDirection` | Order in which chars are revealed in sequential mode. | `'start' \| 'end' \| 'center'` | `'start'` |
| `useOriginalCharsOnly` | Scramble using only glyphs present in `text` (minus spaces). | `boolean` | `false` |
| `characters` | Pool of glyphs to scramble through. | `string` | `'ABC…!@#$…'` |
| `animateOn` | When to start the animation. | `'hover' \| 'click' \| 'view' \| 'inViewHover'` | `'hover'` |
| `clickMode` | Click behaviour: `'once'` decrypts then stops; `'toggle'` flips state on each click. | `'once' \| 'toggle'` | `'once'` |
