Cyberpunk UI has a recognizable visual grammar: 45-degree cut corners, high-contrast neon accents over near-black surfaces, tiny technical HUD labels, and sharp hover glitches. Most sites build those angled buttons with hand-coded SVGs or PNGs — which break the moment the button text changes length.
In modern CSS, clip-path: polygon() gives you responsive cut corners that stretch to any width, and combining it with layered neon borders and glitch hover states takes only a few dozen lines of pure CSS.
The quick answer
Clip two opposite corners with clip-path: polygon() and a --cut variable, then pair it with a bold accent fill and crisp uppercase monospace typography:
.cyber-btn {
--cut: 14px;
position: relative;
padding: 14px 32px;
background: #fcee0a;
color: #090a0f;
font: 700 15px/1 "Space Grotesk", system-ui, sans-serif;
letter-spacing: 0.14em;
border: 0;
cursor: pointer;
clip-path: polygon(
var(--cut) 0, 100% 0,
100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
0 100%, 0 var(--cut)
);
}
Hover the button below to see the cut-corner frame, HUD tag, and hover accent shift:
Want a full hover glitch button with torn strips and RGB separation? Tweak it live in Glitch Button:
Why border disappears with clip-path (and the 2 clean fixes)
As soon as you put border: 2px solid #00f5d4 on a clip-path: polygon() card, the clipped diagonal corners slice right through your border — leaving missing diagonal edges.
There are two reliable pure-CSS ways to get a crisp outline around chamfered corners:
- Nested polygon (best for sharp 1–2 px borders): give the outer wrapper the neon color and
padding: 1.5px, and clip both the outer wrapper and the dark inner panel with the exact samepolygon(). filter: drop-shadow()on a parent: drop-shadow respects the clipped alpha mask of the child, so it wraps the diagonal cut with a soft neon glow.
Combining HUD panels, neon borders, and glitch titles
Good cyberpunk UI relies on contrast and restraint: 90% of the interface is calm dark slate (#0a0c12–#141824) with thin hairlines and monospace micro-labels, and only 10% carries bright acid yellow (#fcee0a), cyan (#00f5d4), or magenta (#ff2a85).
To complete a cyberpunk hero or landing page, pair cut-corner panels with an animated neon border, a flickering sign, or a calm-then-glitching heading:
Gotchas & browser support
clip-pathhidesbox-shadowandoutline. Putfilter: drop-shadow(...)on a wrapper element if you need outer glow, and make sure:focus-visiblechanges background/color or outlines the unclipped wrapper so keyboard navigation stays clearly visible.- Avoid rainbow overload. Stick to one primary neon accent (e.g. cyan
#00f5d4) and one warning/secondary accent (yellow#fcee0aor magenta#ff2a85). - Browser support.
clip-path: polygon()withcalc()is supported in all modern desktop and mobile browsers.
Accessibility
Because clip-path clips standard focus outlines, always style :focus-visible explicitly (for example, inverting background and text colors) and respect prefers-reduced-motion on hover glitches:
.cyber:focus-visible {
background: #ff2a85;
color: #fff;
outline: none;
}
@media (prefers-reduced-motion: reduce) {
.cyber {
transition: none;
}
}
FAQ
How do you make cut corners in CSS without SVG?
Use clip-path: polygon() with a CSS variable like --cut: 14px and calc(100% - var(--cut)) for the bottom-right corner. The shape adapts automatically to any button or card size.
Why does my CSS border disappear on diagonal clip-path corners?
clip-path clips the element after its border is painted, slicing the diagonal edges off. Wrap the element in a parent with padding: 2px, give the parent the border color or gradient, and apply the same clip-path: polygon() to both.
Can I use cyberpunk CSS buttons in Tailwind or React?
Yes — define a single .cyber-cut utility class in your stylesheet with --cut and clip-path: polygon(...), and combine it with any Tailwind color, padding, or hover classes.