SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/retro-ui

7 CSS Retro UI

7 Pure CSSPublished 2026-10-05Free · no sign-up

Seven retro interface pieces: a 1990s desktop window with bevelled buttons, an 8-bit pixel button, a green-screen terminal login, a synthwave sunset card, an early desktop dialog with a striped title bar, a packaging-style sticker and a segmented progress bar.

01. Classic Desktop Window

RetroWindow

A 1990s desktop window with a gradient title bar, bevelled borders and chunky buttons. The bevels are pairs of light and dark borders (light on top and left, dark on bottom and right), which is the whole trick behind the look.

View code
<section class="rt1" aria-labelledby="rt1h"><header><h3 id="rt1h">Save changes?</h3><button aria-label="Close">×</button></header><p>Do you want to save changes to Untitled.txt before closing?</p><div class="btns"><button>Save</button><button>Don’t save</button><button>Cancel</button></div></section>
.rt1 { width: 300px; max-width: 100%; box-sizing: border-box; padding: 3px; background: #c0c0c0; border: 2px solid; border-color: #fff #404040 #404040 #fff; font: 13px "MS Sans Serif", Tahoma, Geneva, sans-serif; color: #000; }
.rt1 header { display: flex; align-items: center; justify-content: space-between; padding: 3px 4px; background: linear-gradient(90deg, #000080, #1084d0); }
.rt1 h3 { margin: 0; color: #fff; font-size: 13px; }
.rt1 header button { width: 18px; height: 16px; padding: 0; line-height: 1; }
.rt1 p { margin: 14px 10px; }
.rt1 .btns { display: flex; justify-content: flex-end; gap: 6px; padding: 0 8px 8px; }
.rt1 button { min-width: 70px; padding: 4px 8px; background: #c0c0c0; border: 2px solid; border-color: #fff #404040 #404040 #fff; font: inherit; color: #000; cursor: pointer; }
.rt1 header button { min-width: 0; }
.rt1 button:active { border-color: #404040 #fff #fff #404040; }
.rt1 button:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

02. Pixel Art Button

RetroPixel

An 8-bit game button with stepped pixel corners and a hard drop shadow, drawn with box-shadows rather than images. Pressing moves the button into its shadow, and image-rendering is not needed because nothing is scaled.

View code
<button class="rt2">PRESS START</button>
.rt2 { position: relative; padding: 12px 22px; border: 0; background: #22c55e; color: #052e16; font: 700 16px "Courier New", ui-monospace, monospace; letter-spacing: .08em; cursor: pointer; box-shadow: 0 -4px 0 0 #052e16, 0 4px 0 0 #052e16, -4px 0 0 0 #052e16, 4px 0 0 0 #052e16, 4px 8px 0 0 #000, 8px 4px 0 0 #000; }
.rt2:active { transform: translate(4px, 4px); box-shadow: 0 -4px 0 0 #052e16, 0 4px 0 0 #052e16, -4px 0 0 0 #052e16, 4px 0 0 0 #052e16; }
.rt2:focus-visible { outline: 3px dashed #fde047; outline-offset: 10px; }

03. Green Screen Login

RetroTerminal

A login form styled like a monochrome green terminal, with scanlines over the panel and a glowing caret colour. The fields are real labelled inputs, so the retro look costs nothing in usability.

View code
<form class="rt3"><p>SYSTEM ACCESS</p><label>USER <input autocomplete="username"></label><label>PASS <input type="password" autocomplete="current-password"></label><button>LOGIN_</button></form>
.rt3 { position: relative; display: grid; gap: 10px; width: 280px; max-width: 100%; padding: 18px; box-sizing: border-box; border-radius: 12px; background: #031a0b; color: #4ade80; font: 600 14px "Courier New", ui-monospace, monospace; text-shadow: 0 0 5px rgba(74,222,128,.6); overflow: hidden; }
.rt3::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.3) 2px 3px); pointer-events: none; }
.rt3 p { margin: 0 0 4px; }
.rt3 label { display: flex; align-items: center; gap: 10px; }
.rt3 input { flex: 1; min-width: 0; padding: 4px 6px; border: 0; border-bottom: 2px solid #166534; background: transparent; color: #86efac; font: inherit; caret-color: #86efac; }
.rt3 input:focus { outline: none; border-bottom-color: #4ade80; }
.rt3 button { justify-self: start; padding: 4px 10px; border: 2px solid #4ade80; background: transparent; color: #4ade80; font: inherit; cursor: pointer; }
.rt3 button:hover, .rt3 button:focus-visible { background: #4ade80; color: #031a0b; outline: none; text-shadow: none; }

04. Synthwave Sunset Card

Retro80s

An 80s-inspired card with a striped sunset, a magenta to orange gradient and chrome-style heading. The sun's stripes are a repeating gradient mask, and the heading gradient is clipped to the text with a solid fallback.

View code
<article class="rt4"><div class="sun" aria-hidden="true"></div><h3>NIGHT DRIVE</h3><p>Volume 2 · Out now</p></article>
.rt4 { display: grid; justify-items: center; width: 240px; max-width: 100%; padding: 20px 16px; box-sizing: border-box; border-radius: 16px; background: linear-gradient(#1a0533, #3b0764 60%, #701a75); font-family: Inter, system-ui, sans-serif; text-align: center; overflow: hidden; }
.rt4 .sun { width: 120px; height: 60px; border-radius: 60px 60px 0 0; background: linear-gradient(#fde047, #f97316 50%, #db2777); -webkit-mask: linear-gradient(#000 45%, transparent 45% 52%, #000 52% 64%, transparent 64% 70%, #000 70% 80%, transparent 80% 85%, #000 85%); mask: linear-gradient(#000 45%, transparent 45% 52%, #000 52% 64%, transparent 64% 70%, #000 70% 80%, transparent 80% 85%, #000 85%); }
.rt4 h3 { margin: 12px 0 2px; color: #f0abfc; font-size: 26px; font-style: italic; font-weight: 900; letter-spacing: .06em; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) { .rt4 h3 { background: linear-gradient(#fff 40%, #f0abfc 50%, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; } }
.rt4 p { margin: 0; color: #f5d0fe; font-size: 13px; }

05. Striped Title Bar Dialog

RetroDialog

An early desktop-publishing style dialog: black and white, a title bar with horizontal pinstripes and a square close box, and a thick default button outline. Everything is borders and repeating gradients in pure black and white.

View code
<section class="rt5" aria-labelledby="rt5h"><header><button aria-label="Close"></button><h3 id="rt5h">Print</h3></header><p>Print 2 copies of “Poster”?</p><div class="b"><button>Cancel</button><button class="def">Print</button></div></section>
.rt5 { width: 260px; max-width: 100%; box-sizing: border-box; border: 2px solid #000; background: #fff; box-shadow: 4px 4px 0 #000; font: 13px Chicago, Geneva, "Courier New", monospace; color: #000; }
.rt5 header { position: relative; display: grid; place-items: center; height: 22px; border-bottom: 2px solid #000; background: repeating-linear-gradient(#000 0 1px, #fff 1px 3px); }
.rt5 h3 { margin: 0; padding: 0 8px; background: #fff; font-size: 13px; }
.rt5 header button { position: absolute; left: 8px; width: 14px; height: 14px; padding: 0; border: 2px solid #000; background: #fff; cursor: pointer; }
.rt5 p { margin: 16px 12px; }
.rt5 .b { display: flex; justify-content: flex-end; gap: 10px; padding: 0 12px 12px; }
.rt5 .b button { padding: 4px 14px; border: 2px solid #000; border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }
.rt5 .def { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #000; }
.rt5 button:focus-visible { outline: 2px dotted #000; outline-offset: 3px; }

06. Retro Sticker Badge

RetroBadge

A rotated round sticker with a double ring and bold condensed type, the kind of badge on old product packaging. The rings are stacked inset box-shadows, so the sticker is a single element plus its text, and it is one image to assistive technology.

View code
<div class="rt6" role="img" aria-label="Sticker: Since 1984, hand made"><span>SINCE<br><b>1984</b><br>HAND MADE</span></div>
.rt6 { display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%; background: #c2410c; transform: rotate(-12deg); box-shadow: inset 0 0 0 6px #c2410c, inset 0 0 0 8px #fff7ed, inset 0 0 0 14px #c2410c, inset 0 0 0 15px #fed7aa, 0 6px 14px -6px rgba(0,0,0,.4); font: 800 13px/1.1 Impact, "Arial Narrow", sans-serif; color: #fff7ed; text-align: center; letter-spacing: .06em; }
.rt6 b { font-size: 34px; color: #fef3c7; }

07. Chunky Segmented Progress

RetroProgress

A progress bar made of separate blocks that fill one at a time, like old installers and game loading screens. It is a native progress element underneath for assistive technology, with the blocks drawn by a repeating gradient sized to the value.

View code
<div class="rt7"><label for="rt7p">LOADING LEVEL 3</label><div class="bar"><span style="--v:65%"></span></div><progress id="rt7p" max="100" value="65">65%</progress></div>
.rt7 { width: 280px; max-width: 100%; font: 700 13px "Courier New", ui-monospace, monospace; color: #fde047; }
.rt7 label { display: block; margin-bottom: 6px; }
.rt7 .bar { height: 22px; padding: 3px; border: 3px solid #fde047; box-sizing: border-box; }
.rt7 .bar span { display: block; height: 100%; width: var(--v); background: repeating-linear-gradient(90deg, #fde047 0 14px, transparent 14px 18px); }
.rt7 progress { position: absolute; width: 1px; height: 1px; opacity: 0; }

About these CSS Retro UI

Bevels are border colours

The classic desktop look is light borders on the top and left and dark ones on the bottom and right. Swap them on :active and the button looks pressed in.

Pixels from box-shadows

Hard, unblurred box-shadows stacked around an element draw stepped pixel corners and drop shadows without any images, and they scale cleanly.

Keep modern usability

Retro is a look, not a licence to break things. Keep real labels, visible focus outlines and readable contrast; the green-screen form still uses labelled inputs.

Fonts with fallbacks

Period fonts such as Chicago or MS Sans Serif are rarely installed, so give each stack a good modern fallback, or load an open-licensed lookalike.

Frequently asked questions

Are the system fonts in the demos available?

Usually not; the fallbacks in each font stack are used instead.

Can retro UI be accessible?

Yes. The demos keep native controls, labels and focus states under the vintage styling.

Is the pixel button made with images?

No. It is box-shadows only.