AI CSS Animations

Insert Coin Arcade Text

An arcade attract-screen line: INSERT COIN blinks on a steady beat and swaps color each time, a pointer nudges beside it, and a credit counter sits underneath. All hard steps, no fades.

Also known as: press start text, arcade blinking text, retro game title screen text.

INSERT COIN
CREDIT 00

HTML

<div class="txt-insert-coin-text">
  <div class="txt-insert-coin-text-cta"><span class="txt-insert-coin-text-arrow" aria-hidden="true"></span><span class="txt-insert-coin-text-blink">INSERT COIN</span></div>
  <div class="txt-insert-coin-text-credit">CREDIT 00</div>
</div>

CSS

.txt-insert-coin-text {
  --c: var(--txt-color, #3b82f6);
  font-size: var(--txt-size, 32px);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--c);
  text-shadow: 0.07em 0.07em 0 color-mix(in srgb, var(--c) 40%, #000);}
.txt-insert-coin-text-cta {
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding-right: 0.85em;
}
.txt-insert-coin-text-arrow {
  width: 0.5em;
  height: 0.6em;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  animation: txt-insert-coin-text-nudge 0.8s steps(1, end) infinite;
}
.txt-insert-coin-text-blink {
  animation: txt-insert-coin-text-blink 1.6s steps(1, end) infinite;
}
.txt-insert-coin-text-credit {
  margin-top: 0.7em;
  text-shadow: none;
  font-size: 0.5em;
  letter-spacing: 0.24em;
  opacity: 0.7;
}
@keyframes txt-insert-coin-text-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(0.15em); }
}
@keyframes txt-insert-coin-text-blink {
  0%, 100% { opacity: 1; color: var(--c); }
  38% { opacity: 0; }
  50% { opacity: 1; color: #f59e0b; }
  88% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .txt-insert-coin-text, .txt-insert-coin-text *, .txt-insert-coin-text::before, .txt-insert-coin-text::after, .txt-insert-coin-text *::before, .txt-insert-coin-text *::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