Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Text

  • Text
  • Heading
  • SectionHeader
  • Prose
  • Markdown
  • Formula
  • AuroraText
  • LineShadowText
  • AnimatedShinyText
  • AnimatedGradientText
  • WordRotate
  • TypingAnimation
  • SparklesText
  • SplitText
  • BlurText
  • FlipText
  • TextReveal
  • DecryptedText
  • GlitchText
  • CircularText
  • ScrollReveal
  • TrueFocus
  • ASCIIText
  • CurvedLoop
  • FallingText
  • FuzzyText
  • ScrambledText
  • ScrollFloat
  • ScrollVelocity
  • Shuffle
  • TextCursor
  • TextPressure
  • VariableProximity

Code

  • Code
  • CodeBlock
  • Snippet
  • CodeDiff
  • Kbd

DecryptedText

decrypted-text

Scrambles and progressively resolves characters into the supplied text.

Usage

Basic usage

After scrolling into the viewport, the characters are garbled and rolled, and are decoded to plain text bit by bit.

Decrypting access...
tsx
<DecryptedText
  text="Decrypting access..."
  className="text-2xl font-semibold text-foreground"
/>

Hover decoding

animateOn="hover" decodes when hovering and resets to garbled characters when moved out.

Hover to decrypt
tsx
<DecryptedText
  text="Hover to decrypt"
  animateOn="hover"
  className="text-2xl font-semibold text-primary"
/>

Decoding speed

speed is the millisecond interval between each garbled code refresh. The smaller the value, the faster the scrolling.

Fast scramble
tsx
<DecryptedText
  text="Fast scramble"
  speed={25}
  className="text-2xl font-semibold text-foreground"
/>

Custom character set

characters specifies the garbled sampling character set, for example, only 0/1 is used for the binary stream look and feel.

BINARY MODE
tsx
<DecryptedText
  text="BINARY MODE"
  characters="01"
  className="text-2xl font-semibold text-primary"
/>

When to use

Use DecryptedText for a technical or security-themed reveal that scrambles characters before resolving them. Use BlurText for a soft focus transition, GlitchText for RGB tearing, or SplitText for a straightforward staggered entrance.

Import

ts
import { DecryptedText } from "@hulianui/ui"

Props

NameTypeDefaultDescription
text *string-target plaintext
speednumber55The interval between each garbled refresh is milliseconds
animateOn"view" | "hover""view"Trigger method: view scrolls into the viewport and decodes it once/hover decodes it and resets it when it moves out.
charactersstringUppercase and lowercase letters + numbers + symbolsGarbled sampling character set

The remaining <span> native properties support.

Usage guidelines

  • Random scrambling starts in a client effect to avoid SSR/hydration mismatches; the server-rendered first frame is readable text.
  • The component uses tabular-nums to limit width jitter. Do not override that width behavior through className, or characters may jump as they change.

Related

Text · Heading · Prose · Markdown · AuroraText · AnimatedShinyText

Playground

Decrypting the secret
<DecryptedText text="Decrypting the secret" animateOn="view" speed={55} />
PreviousTextRevealTypographyNextGlitchText

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Usage guidelines
    • Related
  • Playground