Decrypt Text
motiq/decrypt-textFreeComponent
Copy that arrives decoded rather than typed: every glyph boils from the first frame and character i locks at 350 + i·55ms ± 120ms behind a 420ms accent flash. Mount / in-view / hover triggers, a monospace terminal variant, SSR-readable text, reduced-motion safe.
Live preview
live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.motiq.dev/r/decrypt-text.jsonSource
1"use client";23import * as React from "react";45import { cn } from "@/lib/utils";6import { useReducedMotion, useVisibilityPause } from "@/lib/motiq";78/* -------------------------------------------------------------------------- */9/* Types */10/* -------------------------------------------------------------------------- */1112/** What starts the first decrypt run. Hover re-triggering is separate. */13export type DecryptTextTrigger = "mount" | "inview" | "hover";1415/** `display` = headline scale; `terminal` = mono CLI card with prompt + caret. */16export type DecryptTextVariant = "display" | "terminal";1718export interface DecryptTextProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {19 /** The real string. Rendered readable on the server and to screen readers. */20 text: string;21 /** Scramble pool each unresolved character cycles through. */22 glyphs?: string;23 /** Glyph cycle floor in ms (each char jitters between `speed` and `speed + 35`). */24 speed?: number;25 /** Per-character lock-in stagger in ms. */26 stagger?: number;27 /** Delay before the first character can lock, in ms. */28 startDelay?: number;29 /** Random spread applied to every character's lock time, in ms (± this value). */30 jitter?: number;31 /** What starts the first run. */32 trigger?: DecryptTextTrigger;33 /** Visual treatment. */34 variant?: DecryptTextVariant;35 /** Re-run automatically this many ms after settling; `false` runs once. */36 loop?: number | false;37 /** Re-scramble on pointer enter (1.5s cooldown). */38 retriggerOnHover?: boolean;39 /** Deterministic seed for the per-character jitter (SSR-stable). */40 seed?: number;41 /** Element tag for the rendered text. */42 as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | "div";43 /** Force the static, resolved variant regardless of system preference. */44 reducedMotion?: boolean;45 /** Fires each time the line finishes resolving. */46 onDecrypted?: () => void;47}4849interface CharItem {50 /** Index into the flat character list — drives the stagger ramp. */51 i: number;52 ch: string;53}5455/* -------------------------------------------------------------------------- */56/* Constants */57/* -------------------------------------------------------------------------- */5859const POOL_DISPLAY = "#%&@$?!*+=/{}[]<>~^";60const POOL_TERMINAL = "abcdef0123456789$#%&*+=/|_~";61// … truncated
What it pulls in
Other registry items
Files it writes
More from motiq
All 100 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Activity Streamactivity-stream | motiq | Components | Free | 1 dep | |
| Adaptive Safe-Zone Gridadaptive-safe-zone-grid | motiq | Components | Free | no deps | |
| Agent Run Timelineagent-run-timeline | motiq | Components | Free | 1 dep | |
| AI Response Streamai-response-stream | motiq | Components | Free | 1 dep | |
| Animated Accordionanimated-accordion | motiq | Components | Free | 2 deps | |
| Animated Buttonanimated-button | motiq | Components | Free | 1 dep | |
| Animated Dialoganimated-dialog | motiq | Components | Free | 2 deps | |
| Animated Gridanimated-grid | motiq | Components | Free | 2 deps |
