Run Button
A copy-paste code & terminal component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Code & TerminalHTMLCSSany framework
Copy into your project
HTML
<!-- Run Button — toggle .is-running while the task is in progress -->
<button class="nuda-run" type="button">
<span class="nuda-run__icon">
<svg class="nuda-run__play" viewBox="0 0 24 24" fill="currentColor">
<path d="M8 5 L19 12 L8 19 Z" />
</svg>
<span class="nuda-run__spinner"></span>
</span>
<span class="nuda-run__label">Run</span>
</button>CSS
/* Run Button
Play icon swaps for a spinner while .is-running.
Customize: --run-bg, --run-fg */
.nuda-run {
--run-bg: #e4ff54;
--run-fg: #09090b;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 14px 7px 9px;
background: var(--run-bg);
border: none;
border-radius: 7px;
color: var(--run-fg);
font: 700 0.875rem ui-sans-serif, system-ui, sans-serif;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.25s;
}
.nuda-run:hover {
transform: translateY(-1px);
box-shadow: 0 0 16px rgba(228, 255, 84, 0.4);
}
.nuda-run__icon {
position: relative;
width: 22px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(9, 9, 11, 0.15);
border-radius: 5px;
flex-shrink: 0;
}
.nuda-run__play {
width: 11px;
height: 11px;
margin-left: 1px;
transition: opacity 0.2s, transform 0.2s;
}
.nuda-run__spinner {
position: absolute;
width: 14px;
height: 14px;
border: 1.5px solid rgba(9, 9, 11, 0.2);
border-top-color: var(--run-fg);
border-radius: 50%;
opacity: 0;
animation: nuda-run-spin 1s linear infinite;
}
.nuda-run.is-running .nuda-run__play { opacity: 0; transform: scale(0.4); }
.nuda-run.is-running .nuda-run__spinner { opacity: 1; }
@keyframes nuda-run-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.nuda-run__spinner { animation: none; }
}How to use Run Button
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.