Skip to content

Gradient Wipe

A copy-paste animated gradients component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Animated GradientsHTMLCSSany framework

Copy into your project

HTML
<!-- Gradient Wipe -->
<div class="nuda-ga2-wipe" role="img" aria-label="Diagonal gradient wipe reveal">
  <div class="nuda-ga2-wipe__layer"></div>
</div>
CSS
.nuda-ga2-wipe {
  position: relative;
  width: 220px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  background: #161616;
}

.nuda-ga2-wipe__layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,#e4ff54,#22d3ee,#a855f7);
}

.nuda-ga2-wipe__layer {
  animation: _nuda-ga2wipe-reveal 4s ease-in-out infinite;
}

@keyframes _nuda-ga2wipe-reveal {
  0%,100% {
    clip-path: polygon(0 0,0 0,0 100%,0 100%);
  }
  50% {
    clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ga2-wipe__layer {
    animation: none;
    clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
  }
}

How to use Gradient Wipe

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.

More animated gradients components

← Browse all NudaUI components