Cipher Text

Characters scramble and decode to reveal the final message.

Main Features of Cipher Text

How to Use Cipher Text in Next.js

Installation Guide for Cipher Text

Props

Customize the component with these props

PropertyTypeDefaultDescription
targetText
stringENCRYPTED_DATATarget text to reveal
backgroundColor
stringbg-zinc-950Background color of the component
textColor
stringtext-green-400Color of the text
textSize
stringtext-7xl md:text-9xlSize of the text
cyclesPerLetter
number2Number of cycles per letter
shuffleTime
number50Time between shuffles in milliseconds
chars
string!@#$%^&*():{};|,.<>/?Characters to use for scrambling
autoScramble
booleantrueWhether to auto-scramble on mount
className
stringAdditional CSS classes

When to Use

Ideal for security dashboards, developer portfolios, and tech-themed Next.js landing pages. Use this React component when you want to build a 'hacker' or 'encryption' aesthetic, decoding a message as it enters the view.

Best Practices

Maintain consistent spacing within your design system by choosing a `targetText` that fits your layout. Follow React best practices by avoiding too many `cyclesPerLetter` for longer strings to maintain readability. Optimize for performance by using a lightweight character set for scrambling.

Why This Component Matters in Modern UI Development

Cipher reveals add a layer of interactivity and narrative flair. This production-ready component gives you a robust implementation of text scrambling physics, adding a high-tech feel and semantic authority to your real-world application architecture.

Frequently Asked Questions

QCan I use custom characters for scrambling?

Yes, the `chars` prop lets you define exactly which symbols (e.g., binary, matrix code, or emoji) are used during the shuffle.

QHow long does the reveal take?

The duration is determined by `cyclesPerLetter` and `shuffleTime`. Shorter shuffles feel 'glitchy', while longer ones feel like complex decryption.

QDoes it support auto-reveal on scroll?

Yes, it is designed to trigger automatically when mounted, which can be combined with an Intersection Observer for scroll-timed reveals.

Cipher Text - React Text Animation & Reveal | Uilora