BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/godui/encrypted-card

Encrypted Card

godui/encrypted-card
FreeComponent

A card whose surface hides a live stream of scrambling ciphertext, revealed only through a soft spotlight that follows the pointer.

Install it

npx shadcn@latest add https://godui.design/r/encrypted-card.json

Source

packages/components/src/encrypted-card/encrypted-card.tsxgodui.design/r/encrypted-card.json
1"use client";
2
3import * as React from "react";
4
5export type EncryptedCardProps = React.HTMLAttributes<HTMLDivElement> & {
6 /** Pool of glyphs the encrypted stream is drawn from. */
7 characters?: string;
8 /** Milliseconds between glyph re-randomizations while hovered. */
9 speed?: number;
10 /** Radius of the reveal window that follows the pointer, in pixels. */
11 revealRadius?: number;
12 /** Color of the encrypted glyph stream. Accepts any CSS color. */
13 streamColor?: string;
14 /**
15 * Opacity of the revealed glyph stream, 0–1. Lower values make the ciphertext
16 * subtler. Defaults to 1 (fully opaque inside the reveal window).
17 */
18 streamOpacity?: number;
19};
20
21// A wide alphabet keeps the stream looking like ciphertext rather than a word.
22const DEFAULT_CHARS =
23 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789<>[]{}/*#$%&";
24// Enough characters to flood any reasonably sized card.
25const STREAM_LEN = 1500;
26
27const ROOT_BASE =
28 "group relative overflow-hidden rounded-xl border border-border bg-card text-card-foreground";
29
30// The glyph layer, revealed only inside a soft radial mask centered on the
31// pointer (`--x` / `--y`, defaulting to center so the first paint isn't a corner
32// flash). `mask-image` is a single longhand so the shorthand-reset trap does not
33// apply here.
34const STREAM_BASE =
35 "pointer-events-none absolute inset-0 select-none break-all font-mono text-[11px] leading-[1.15] tracking-[0.15em] opacity-0 [transition:opacity_300ms_ease] group-hover:[opacity:var(--stream-opacity,1)] motion-reduce:[transition:none] [mask-image:radial-gradient(var(--reveal)_circle_at_var(--x,50%)_var(--y,50%),#000_0%,transparent_100%)] [-webkit-mask-image:radial-gradient(var(--reveal)_circle_at_var(--x,50%)_var(--y,50%),#000_0%,transparent_100%)]";
36
37function randomString(length: number, chars: string): string {
38 let out = "";
39 for (let i = 0; i < length; i++) {
40 out += chars[Math.floor(Math.random() * chars.length)];
41 }
42 return out;
43}
44
45function usePrefersReducedMotion(): boolean {
46 const [reduced, setReduced] = React.useState(false);
47 React.useEffect(() => {
48 const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
49 const update = () => setReduced(mq.matches);
50 update();
51 mq.addEventListener("change", update);
52 return () => mq.removeEventListener("change", update);
53 }, []);
54 return reduced;
55}
56
57const EncryptedCard = React.forwardRef<HTMLDivElement, EncryptedCardProps>(
58 (
59 {
60// … truncated

What it pulls in

Other registry items

  • @godui/godui-theme

Files it writes

  • packages/components/src/encrypted-card/encrypted-card.tsx

Facts

Registry
godui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

godui.design LucasBassetti/godui on GitHub Raw registry item This item as JSON

More from godui

All 105 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordiongoduiComponentsFree1 dep
Agent Flowagent-flowgoduiComponentsFree1 dep
Agent Timelineagent-timelinegoduiComponentsFree1 dep
Animated Beamanimated-beamgoduiComponentsFree1 dep
Animated Testimonialsanimated-testimonialsgoduiComponentsFree1 dep
Animated Tooltipanimated-tooltipgoduiComponentsFree1 dep
App Showcaseapp-showcasegoduiComponentsFree1 dep
Aurora Textaurora-textgoduiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex