UICraft / Craft
CSSDot Matrix Ticker

How Dot Matrix Ticker works

Turn ordinary text into a configurable LED display with one mask and a stepped loop.

Demo
Display onlineDM–01

How it works

01 — Begin with readable text

Stage 01Plain text

Ship interfaces that feel fast.

The effect starts with a normal monospace sentence. Keeping real text underneath the treatment makes the component easier to size and maintain.

01-readable-text.tsx
const message = `${text.trim().toUpperCase() || "DOT MATRIX TICKER"} `
 
<span className="font-mono text-4xl font-medium tracking-[0.08em]">
  {message}
</span>

02 — Treat the type as light

Stage 02Light

SHIP INTERFACES THAT FEEL FAST

A black enclosure, a bright foreground, and three text shadows establish the light source before the matrix is introduced.

02-add-light.tsx
<div className="overflow-hidden bg-black p-4 text-green-400">
  <span className="font-mono text-4xl [text-shadow:0_0_4px_currentColor,0_0_9px_currentColor,0_0_16px_currentColor]">
    {message}
  </span>
</div>

03 — Punch out the dots

Stage 03Matrix

SHIP INTERFACES THAT FEEL FAST

The overlay is black everywhere except the center of each repeating cell. Those transparent holes reveal the glowing text as individual LEDs.

mask-image: radial-gradient(circle at 1.5px 1.5px,
  transparent 0 1.5px,
  #000 1.7px
);
mask-size: 4px 4px;
03-dot-mask.tsx
<div className="relative overflow-hidden bg-black p-4 text-green-400">
  <span className="font-mono text-4xl">{message}</span>
  <span className="pointer-events-none absolute inset-0 bg-black dot-mask" />
</div>

04 — Close the enclosure

Stage 04Enclosure

Render the message twice, move the track by exactly half its width, and the second copy arrives where the first one began. A stepped timing function keeps the movement aligned with the matrix. Edge fade, inset shadow, and a glass streak make the panel feel manufactured rather than like masked type on a rectangle.

04-seamless-loop.tsx
<div className="flex w-max animate-dot-matrix-ticker whitespace-nowrap">
  <span className="pr-8">{message}</span>
  <span className="pr-8" aria-hidden="true">{message}</span>
</div>
04-seamless-loop.css
@keyframes dot-matrix-ticker-scroll {
  to { transform: translate3d(-50%, 0, 0); }
}

Speed changes duration, not distance. Measure that duration from the track’s actual width so the loop stays seamless at every setting.

Playground

PlaygroundDisplay controls

Display controls

Tune the message, matrix, and movement.

Color
Matrix shape