Stop Generating
A copy-paste ai / chat ui component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
AI / Chat UIHTMLCSSany framework
Copy into your project
HTML
<!-- Stop Generating — spinner ring + center square -->
<button class="nuda-stop" type="button">
<span class="nuda-stop__icon">
<span class="nuda-stop__square"></span>
</span>
<span class="nuda-stop__label">Stop generating</span>
</button>CSS
/* Stop Generating
Pill button with spinner ring + center square; turns red on hover.
Customize: --stop-color, --stop-danger */
.nuda-stop {
--stop-color: #e4ff54;
--stop-danger: #ff6363;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 8px 14px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
color: #fafafa;
font: 600 0.875rem ui-sans-serif, system-ui, sans-serif;
cursor: pointer;
transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.nuda-stop:hover {
border-color: var(--stop-danger);
background: rgba(255, 99, 99, 0.08);
color: #fff;
}
.nuda-stop__icon {
position: relative;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.nuda-stop__icon::before {
content: "";
position: absolute;
inset: 0;
border: 1.5px solid var(--stop-color);
border-radius: 50%;
border-top-color: transparent;
animation: nuda-stop-spin 1s linear infinite;
box-sizing: border-box;
transition: border-color 0.25s;
}
.nuda-stop:hover .nuda-stop__icon::before {
border-color: var(--stop-danger);
border-top-color: transparent;
}
.nuda-stop__square {
width: 7px;
height: 7px;
background: var(--stop-color);
border-radius: 1px;
transition: background 0.25s;
}
.nuda-stop:hover .nuda-stop__square { background: var(--stop-danger); }
@keyframes nuda-stop-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.nuda-stop__icon::before { animation: none; }
}How to use Stop Generating
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.