Cyberpunk Web Design: A Quick Start
Build a cyberpunk web design starter with a copyable palette, glowing card, restrained animation, contrast checks, and reduced-motion support.
A small copyable cyberpunk card: dark surfaces, cyan and magenta accents, one glow, and a restrained pulse. The snippet includes a reduced-motion rule and a short contrast check.
Cyberpunk Web Design: A Quick Start
Use this as a small visual starting point. Paste the snippet into an HTML file, then adjust the colors and spacing for your own interface.
<style>
:root {
color-scheme: dark;
--bg: #0a0a0f;
--surface: #151525;
--text: #f4f4f5;
--muted: #cbd5e1;
--cyan: #00fff9;
--magenta: #ff4fd8;
}
* {
box-sizing: border-box;
}
body {
min-height: 100vh;
margin: 0;
padding: 2rem;
display: grid;
place-items: center;
background: var(--bg);
color: var(--text);
font:
1rem/1.5 system-ui,
sans-serif;
}
main {
width: min(100%, 28rem);
}
.neon-card {
width: 100%;
padding: 2rem;
border: 1px solid var(--cyan);
border-radius: 0.75rem;
background: var(--surface);
box-shadow: 0 0 1.25rem rgb(0 255 249 / 18%);
}
.neon-card .eyebrow {
color: var(--cyan);
letter-spacing: 0.12em;
text-transform: uppercase;
animation: signal 1.8s ease-in-out infinite;
}
.neon-card p {
color: var(--muted);
}
.neon-button {
display: inline-block;
padding: 0.65rem 1rem;
border: 0;
border-radius: 0.35rem;
background: var(--cyan);
color: var(--bg);
font: inherit;
font-weight: 700;
cursor: pointer;
transition:
box-shadow 180ms ease,
transform 180ms ease;
}
.neon-button:hover {
box-shadow: 0 0 1rem rgb(0 255 249 / 45%);
transform: translateY(-2px);
}
.neon-button:focus-visible {
outline: 3px solid var(--magenta);
outline-offset: 3px;
}
@keyframes signal {
50% {
opacity: 0.65;
}
}
@media (prefers-reduced-motion: reduce) {
.neon-card .eyebrow {
animation: none;
}
.neon-button {
transition: none;
}
.neon-button:hover {
transform: none;
}
}
</style>
<main>
<article class="neon-card" aria-labelledby="card-title">
<p class="eyebrow">Signal 01</p>
<h1 id="card-title">Night shift</h1>
<p>A quiet status panel with a little neon around the edge.</p>
<button class="neon-button" type="button">Open the panel</button>
</article>
</main>
The glow comes from one low-opacity shadow; the pulse only changes the label’s opacity. Keep both details small so the text remains easy to read.
Accessibility checks
- Check each text and background pair with a contrast checker. WCAG 2.2 AA calls for at least 4.5:1 for normal text and 3:1 for large text; neon accents alone do not make a safe text color. See W3C’s contrast guidance.
- Don’t use color as the only way to show status or an action. Keep the visible keyboard focus outline and test the button without a mouse.
- Turn on your device’s reduced-motion setting and confirm the pulse and hover movement stop. The MDN guide to
prefers-reduced-motionexplains the media feature used above.
For a broader discussion of typography, layout, and visual hierarchy, continue to Cyberpunk Web Design: A Practical Visual System.
Category
Related Posts
Cyberpunk Web Design: A Practical Visual System
Plan a readable cyberpunk interface with clear color roles, type, layout, restrained motion, and an accessibility check.
DOM, HTML, and CSS for React Interface Basics
Understand how semantic HTML, the browser DOM, CSS layout, and React updates fit together when building accessible, predictable interfaces.
Tailwind CSS Tips and Tricks
Master Tailwind CSS with these advanced tips for building responsive, maintainable web designs.