Vaporwave CSS button
Pink and cyan vaporwave gradient with a hard offset. Hover, click and tab to it to see every state.
CSS
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&display=swap');
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: .5em;
padding: 16px 24px;
font-family: 'Syne', sans-serif;
font-size: 16px;
font-weight: 800;
line-height: 1.2;
letter-spacing: 0.040000000000000000832667268468867405317723751068115234375em;
color: #ffffff;
background: linear-gradient(135deg, #ff71ce 0%, #b967ff 50%, #01cdfe 100%);
border: 0;
border-radius: 4px;
box-shadow: 5px 5px 0 0 #05ffa1;
text-shadow: 2px 2px 0 rgba(109, 40, 217, .8000000000000000444089209850062616169452667236328125);
cursor: pointer;
text-decoration: none;
white-space: nowrap;
-webkit-tap-highlight-color: transparent;
transition: transform 80ms linear, box-shadow 80ms linear, filter 80ms linear;
}
.btn__icon {
display: inline-block;
transition: transform 80ms linear;
}
.btn:hover {
filter: brightness(1.12000000000000010658141036401502788066864013671875);
}
.btn:hover .btn__icon {
transform: translateX(-3px);
}
.btn:active {
transform: translateY(3px);
box-shadow: 2px 2px 0 0 #05ffa1;
transition-duration: 40ms;
}
.btn:focus-visible {
outline: 3px solid #ff71ce;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.btn,
.btn__icon {
transition: none;
animation: none;
}
}
HTML
<button class="btn" type="button">
<span class="btn__icon" aria-hidden="true">✦</span>
Aesthetic
</button>
How this button is built
- Background: a 3-stop
linear-gradient()at 135° (#ff71ce → #b967ff → #01cdfe). - Type: Syne, weight 800, 16px, letter-spacing 4px, in #ffffff.
- Shape: 4px rounded corners with 16px × 24px padding.
- Depth: a hard offset shadow with no blur, which gives it physical depth and a text shadow.
- Interaction: on hover it brightens slightly and nudges its icon, and it presses down 3px when clicked, with 80ms transitions.
- Accessibility: a visible
:focus-visiblering for keyboard users, and all motion turns off underprefers-reduced-motion.
How to use it
- Copy the CSS into your stylesheet. The
@importline loads the Syne font from Google Fonts. Move it to the top of your file, or drop it if you already load the font. - Paste the HTML where you want the button. It works on
<button>,<a>and<input type="submit">. - Change the label, or rename the
.btnclass if it clashes with your framework. Want a different colour or size? Open it in the editor, change it visually, and copy the new code.