CSS VHS Text
Retro VHS screen text with scanlines, a soft color bleed and a bright tracking band rolling down.
PLAY
<p class="text-vhs">PLAY <span aria-hidden="true">▶</span></p>
.text-vhs {
position: relative;
margin: 0;
padding: 8px 14px;
overflow: hidden;
color: #f8fafc;
font: 700 40px/1 ui-monospace, Menlo, monospace;
letter-spacing: 0.1em;
text-shadow:
2px 0 #ff2d5599,
-2px 0 #22d3ee99,
0 0 10px #ffffff66;
animation: text-vhs-jitter 4s steps(1) infinite;
}
/* Scanlines plus a bright band that rolls down */
.text-vhs::after {
content: "";
position: absolute;
inset: 0;
background:
linear-gradient(#ffffff00 42%, #ffffff2e 50%, #ffffff00 58%) 0 0 / 100% 300% no-repeat,
repeating-linear-gradient(#00000000 0 2px, #00000059 2px 4px);
animation: text-vhs-roll 3s linear infinite;
pointer-events: none;
}
@keyframes text-vhs-jitter {
0%, 100% { transform: none; }
50% { transform: translateX(2px); }
52% { transform: translateX(-3px) skewX(-6deg); }
54% { transform: none; }
}
@keyframes text-vhs-roll {
from { background-position: 0 100%, 0 0; }
to { background-position: 0 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
.text-vhs,
.text-vhs::after { animation: none; }
}
About this CSS VHS Text
This CSS VHS Text is 43 lines of pure CSS (1.1 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, linear gradients and text shadows. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
Customize it
The colors in this snippet. Search and replace them to match your brand:
#f8fafc#ff2d5599#22d3ee99#ffffff66#ffffff00#ffffff2e#00000000#00000059
How to use this vhs text
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.text-vhsclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.