AI CSS Animations

LED Dot Matrix Text

Text built from glowing dots on a dark LED board, wiping on column by column, holding, blinking twice and clearing. A radial-gradient mask turns the letters into dots aligned with the board.

Also known as: led sign text css, dot matrix display, departure board text.

BOARDING

HTML

<div class="txt-led-dot-matrix"><span class="txt-led-dot-matrix-glow"><span class="txt-led-dot-matrix-text">BOARDING</span></span></div>

CSS

.txt-led-dot-matrix {
  --c: var(--txt-color, #3b82f6);
  font-size: var(--txt-size, 32px);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  display: inline-block;
  padding: 0.36em 0.48em;
  border-radius: 0.24em;
  background-color: #0d0f12;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent) 0.035em, transparent 0.045em);
  background-size: 0.12em 0.12em;
  box-shadow: 0 0 0 0.06em #23262d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.12em;}
.txt-led-dot-matrix-glow {
  display: inline-block;
  filter: drop-shadow(0 0 0.06em var(--c));
}
.txt-led-dot-matrix-text {
  display: inline-block;
  color: color-mix(in srgb, var(--c) 70%, #fff);
  -webkit-mask-image: radial-gradient(circle, #000 0.045em, transparent 0.055em);
  mask-image: radial-gradient(circle, #000 0.045em, transparent 0.055em);
  -webkit-mask-size: 0.12em 0.12em;
  mask-size: 0.12em 0.12em;
  clip-path: inset(0 100% 0 0);
  animation: txt-led-dot-matrix-wipe 4.5s linear infinite;
}
@keyframes txt-led-dot-matrix-wipe {
  0% { clip-path: inset(0 100% 0 0); animation-timing-function: steps(24, end); }
  22%, 64% { clip-path: inset(0 0 0 0); animation-timing-function: steps(1, end); }
  67% { clip-path: inset(0 0 0 100%); }
  70% { clip-path: inset(0 0 0 0); }
  73% { clip-path: inset(0 0 0 100%); }
  76% { clip-path: inset(0 0 0 0); animation-timing-function: steps(24, end); }
  90%, 100% { clip-path: inset(0 0 0 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .txt-led-dot-matrix, .txt-led-dot-matrix *, .txt-led-dot-matrix::before, .txt-led-dot-matrix::after, .txt-led-dot-matrix *::before, .txt-led-dot-matrix *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --txt-color on the element or a parent. Currently previewing #3b82f6.
  • Font size: set --txt-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 40px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar text animations