Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Encrypted Text, animated React component

Text that decodes itself: every character shuffles through a charset in a fixed-width cell so the line never jitters, then a lock wave runs left to right and each character drops into place with a spring pop. Start it on load, on hover, on click or when it scrolls into view, and loop it if you like.

  • Free
  • Motion Effects
  • Hover
  • Scroll
  • Spring

Like Encrypted Text? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Encrypted Text stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

ACCESS GRANTED

Props

PropTypeDefaultWhat it does
text—The string that ends up on screen.
trigger"load"What starts the decode. Load and viewport start scrambled.
speed50Milliseconds between one character locking and the next.
shuffleSpeed35Milliseconds between scramble ticks.
iterations8Scramble ticks before the first character locks.
revealDelay0Milliseconds before the decode starts.
characters—Characters used while scrambling.
loopfalseScrambles and decodes again after loopDelay.
loopDelay2000Milliseconds between loops.
scrambleClassName—Classes for the scrambling glyphs. Defaults to the accent blue.
as"span"Root element.
onComplete—Called each time every character has locked in.
className—Classes for the root element. It is monospaced by default; pass font-sans to change that.
autoplayfalseReplays the decode every loopDelay ms until someone hovers, focuses or clicks it.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/encrypted-text
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    encrypted-text/
    encrypted-text.tsx
    index.ts
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { EncryptedText } from "@/components/encrypted-text";
    
    export default function Page() {
      return (
        <main>
          <EncryptedText />
        </main>
      );
    }

Like Encrypted Text? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Encrypted Text stays free.

About Encrypted Text

The Encrypted Text component scrambles characters randomly before revealing the final text, cycling through alphanumeric characters at configurable speed before settling. It triggers on mount by default but can also be bound to hover or scroll events. Use it for data-like reveals, loading state placeholders where real data is incoming, or as a stylistic animation for developer-focused products that want to communicate a coded, technical aesthetic.

Good for

  • Data value loading reveals
  • Developer tool interface text
  • Cyberpunk and tech aesthetic animations
  • Hero heading entrance effects