18 CSS Play / Pause Button Designs
Minimal Outline
Refined outline-only button with a hairline border and subtle hover lift. The icon morphs cleanly between play and pause — an editorial, restrained pattern for content-heavy sites.
Minimal Outline the 9th of 18 designs in the 18 CSS Play / Pause Button Designs collection. The design pairs CSS styling with a small amount of JavaScript for interactivity. Copy the HTML, CSS and JavaScript panels below into your project — the JS is self-contained, has zero dependencies, and is safe to drop into any framework (React, Vue, Svelte, plain HTML). The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<button class="pp-min" type="button" aria-pressed="false" aria-label="Play" data-pp>
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
<path class="pp-min-icon" d="M8 5 L8 19 L19 12 Z" fill="currentColor" />
</svg>
<span class="pp-min-label">Listen</span>
</button> .pp-min {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 18px 10px 14px;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 999px;
color: #f0eeff;
font-family: system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.02em;
cursor: pointer;
transition:
background 0.2s,
border-color 0.2s,
color 0.2s,
transform 0.15s;
}
.pp-min:hover {
background: rgba(255, 255, 255, 0.04);
border-color: rgba(255, 255, 255, 0.55);
transform: translateY(-1px);
}
.pp-min:focus-visible {
outline: 3px solid rgba(255, 255, 255, 0.25);
outline-offset: 3px;
}
.pp-min[aria-pressed="true"] {
background: #f0eeff;
color: #0f172a;
border-color: #f0eeff;
}
.pp-min-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-min[aria-pressed="true"] .pp-min-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
.pp-min[aria-pressed="true"] .pp-min-label::before {
content: "Pause";
}
.pp-min[aria-pressed="true"] .pp-min-label {
font-size: 0;
}
.pp-min[aria-pressed="true"] .pp-min-label::before {
font-size: 13px;
} // ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
}); More from 18 CSS Play / Pause Button Designs
Pulse HaloToggle PillNeon ArcadeGradient DiscVoice MemoFloating FABProgress RingMagnetic HoverLiquid DropRipple on ClickCassette TapeLive Badge
View the full collection →