WebberUI

Matrix Letter Glitch

A Matrix-style falling character glitch stream — a curtain of bright glyphs on a dark base, drawn purely in Canvas 2D.

The classic "Matrix rain" background: columns of characters fall from top to bottom, the leading glyph carries a glow, the tail fades out cell by cell, and horizontal glitch tears appear from time to time. A pure Canvas 2D approximation — no WebGL needed.

Loading preview…
npx shadcn@latest add https://webberui.com/r/matrix-letter-glitch.json

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

16
1
1
<MatrixLetterGlitch />

Installation

npx shadcn@latest add https://webberui.com/r/matrix-letter-glitch.json

Or, once registries are configured in components.json, install it as @webberui/matrix-letter-glitch.

Usage

Use it as the background of a bounded container, with foreground content layered above the rain as children. The container needs an explicit height (for example h-[340px]), and viewport height units should be avoided:

import { MatrixLetterGlitch } from "@/components/ui/matrix-letter-glitch";

<div className="relative h-[340px] w-full overflow-hidden rounded-xl">
  <MatrixLetterGlitch>
    <div className="relative z-10 flex h-full items-center justify-center">
      <h3 className="text-4xl font-bold text-white">Wake up, Neo.</h3>
    </div>
  </MatrixLetterGlitch>
</div>

Props

PropTypeDefaultDescription
colorstring"#22c55e"Primary color of the tail
headColorstring"#d6ffe4"Color of the leading glyph at the head (which carries a glow)
backgroundstring"#050a07"Base color of the container
fontSizenumber16Font size (px), which also determines the character cell and column spacing
speednumber1Fall speed multiplier
charactersstringKatakana + digitsString of the character set in use
glitchbooleantrueWhether horizontal glitch tears are enabled
glitchIntensitynumber1Multiplier on how often glitches fire — higher is more frequent

A speed below 1 makes the fall slower, and above 1 makes it more urgent.

Accessibility

  • When the user has "reduce motion" enabled at the system level, only a single static frame of the rain is drawn — the animation loop never starts and no glitches fire
  • The canvas is marked aria-hidden — decorative only, so it does not interfere with assistive technology; the foreground children are announced as usual

On this page