Retro Pixel Button
8-bit style pixel art button with retro gaming aesthetic
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/retro-button.
<iframe src="/embed/retro-button" sandbox="allow-scripts" loading="lazy" title="Retro Pixel Button" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Retro Pixel Button, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<button class="retro-button">START GAME</button>CSS
.retro-button {
padding: 1rem 2rem;
background: #fbbf24;
color: black;
font-weight: bold;
font-family: monospace;
border: 4px solid black;
cursor: pointer;
image-rendering: pixelated;
box-shadow: 4px 4px 0 #000;
transition: all 0.1s ease;
}
.retro-button:hover {
background: #fcd34d;
}
.retro-button:active {
transform: translate(4px, 4px);
box-shadow: 0 0 0 #000;
}LWC — HTML template
<template>
<button class="retro-button" onclick={handleClick}>
<slot>START GAME</slot>
</button>
</template>LWC — JavaScript
import { LightningElement, api } from 'lwc';
export default class RetroButton extends LightningElement {
@api label = 'START GAME';
handleClick() {
this.dispatchEvent(new CustomEvent('buttonclick', {
bubbles: true,
composed: true
}));
}
}LWC — CSS
.retro-button {
padding: 1rem 2rem;
background: #fbbf24;
color: black;
font-weight: bold;
font-family: monospace;
border: 4px solid black;
cursor: pointer;
image-rendering: pixelated;
box-shadow: 4px 4px 0 #000;
transition: all 0.1s ease;
}
.retro-button:hover {
background: #fcd34d;
}
.retro-button:active {
transform: translate(4px, 4px);
box-shadow: 0 0 0 #000;
}LWC — Configuration
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>Where Retro Pixel Button fits
- Gaming
- Retro Apps
- Nostalgia
- Creative Projects
Interaction states & animations
- Hover
- Pixel
Topics
- #retro
- #pixel
- #8bit
- #gaming
- #nostalgia
- #arcade
Accessibility notes
Ensure pixel font is readable. Provide high contrast mode alternative.
Browser support
- All modern browsers