Gradient Sweep
A copy-paste buttons component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
ButtonsHTMLCSSany framework
Copy into your project
HTML
<button class="nuda-btn-gradient-sweep">Gradient Sweep</button>CSS
/* Gradient Sweep — an oversized gradient slides across via background-position. */
.nuda-btn-gradient-sweep {
padding: 12px 30px;
color: #09090b;
border: 0;
border-radius: 10px;
font-weight: 700;
cursor: pointer;
background: linear-gradient(90deg, #e4ff54, #6ee7b7, #e4ff54);
background-size: 200% 100%;
background-position: 100% 0;
transition: background-position 0.5s ease, box-shadow 0.3s;
}
.nuda-btn-gradient-sweep:hover {
background-position: 0 0;
box-shadow: 0 10px 26px -10px rgba(228, 255, 84, 0.6);
}
.nuda-btn-gradient-sweep:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.nuda-btn-gradient-sweep { transition: none; }
}How to use Gradient Sweep
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.