Gradient Slide
A copy-paste text effects component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Text EffectsHTMLCSSany framework
Gradient Slide
Copy into your project
HTML
<!-- Gradient Slide — gradient color slides across text -->
<span class="nuda-gradient-slide">Gradient Slide</span>CSS
/* ── Gradient Slide ──────────────────────────────────────────
Customize:
--nuda-gs-gradient : the gradient colors
--nuda-gs-speed : slide duration
──────────────────────────────────────────────────────────── */
.nuda-gradient-slide {
--nuda-gs-gradient: linear-gradient(
90deg,
#6366f1,
#ec4899,
#f59e0b,
#6366f1
);
--nuda-gs-speed: 3s;
font-size: 2rem;
font-weight: 800;
background: var(--nuda-gs-gradient);
background-size: 200% auto;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent; /* fallback for non-webkit */
animation: nuda-gradient-slide var(--nuda-gs-speed) linear infinite;
}
@keyframes nuda-gradient-slide {
to { background-position: -200% center; }
}
/* ── Accessibility ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
.nuda-gradient-slide {
animation: none;
}
}How to use Gradient Slide
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.