How to make a Stripe-style animated gradient

The slow, glossy wash of color across the top of Stripe's homepage is one of the most imitated effects on the web. Here is how that kind of gradient works, how to make your own version in Ribbonwash in about three minutes, and how to export it as HTML or React.

Open the editor — freeGet Pro · $19

Live: our own Stripe-style scene (download it), with an angled bottom edge. It is not Stripe's code or artwork.

Ribbonwash is an independent tool, not affiliated with or endorsed by Stripe. “Stripe” is a trademark of its owner and is used here only to describe a visual style.

How the effect works

Public write-ups and open-source recreations of the effect describe the same recipe:

Because the movement comes from noise over time, it never repeats exactly. That is ideal for a live page, but it makes a seamless video loop hard, and you can't decide exactly where each color sits.

The Ribbonwash approach

Ribbonwash builds the same kind of look from ribbons instead of noise. A few wide, very soft curves make the color field, and one or two thin, bright ribbons give the glossy streak. You draw where each color goes, every motion runs a whole number of cycles per loop, and colors blend in OKLab so the overlaps stay vivid. The demo above has five curves: violet field, magenta wash, amber band, sky ribbon, light ribbon.

Make it in about 3 minutes

  1. Load the starter scene (optional)

    Download the Stripe-style scene used in the demo above, open the editor and choose Artworks → Open…. To build it yourself instead, choose Artworks → New artwork… → Blank.

  2. Lay down the color field

    With the Brush (B), drag three wide strokes on a diagonal, from bottom left to top right. Give them vivid neighbours — for example violet #6B45F5, magenta #E8318C and amber #FFB22E — then raise their width and softness until they melt into one field.

  3. Add the glossy streak

    With the Pen (P), place three or four points along the same diagonal for a thin ribbon in a light sky blue such as #6CC4F0, and a second, fainter one in near-white.

  4. Make it move

    Open the Motion tab. Give the wide strokes Drift and Breathe so the field slowly changes shape, put Flow on the streak so color travels along it, and add Color shift to one stroke. Set the Loop to about 12 seconds for a calm pace.

  5. Try other palettes

    Press Shift+R (Recolor only) to try new colors while keeping the shapes and motion, or edit the anchor colors to match your brand.

  6. Export the code

    Choose Export → Code… and pick HTML snippet, React component or Complete ZIP (code export is part of Pro ($19, one-time)). Or export a video with Export → Video….

Open the editor — freeGet Pro · $19

Use the exported code

The HTML snippet is one <div> and one script. Choose Height → Fill parent (background) in the export dialog and the gradient fills whatever section you put it in. This is its shape, with the scene data and the poster image shortened:

<section class="hero">
  <div id="mesh-gradient" style="position:absolute;inset:0;overflow:hidden;background:#7A4CF0 center/cover no-repeat"></div>
  <script src="mesh-runtime.min.js"></script>
  <script>
  (function () {
    var el = document.getElementById('mesh-gradient');
    var poster = 'data:image/jpeg;base64,…';
    var scene = {"version":5, …};
    el.style.backgroundImage = 'url(' + poster + ')';   // first frame, shown until WebGL is ready
    if (!window.MeshRuntime) return;
    window.meshGradient = MeshRuntime.createMeshGradient(el, scene, { poster: poster });
  })();
  </script>
  <h1>Your headline here</h1>
</section>

For the angled edge, give the section a height and a clip-path. Keep your content above the gradient with position: relative:

.hero {
  position: relative;
  min-height: 80vh;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
}
.hero h1 { position: relative; }

In React, the exported MeshBackground component takes the same styles:

<MeshBackground style={{ minHeight: '80vh', clipPath: 'polygon(0 0, 100% 0, 100% 78%, 0 100%)' }}>
  <h1>Your headline here</h1>
</MeshBackground>

More on the component, Next.js and props in the React guide.

Ready for production

Open the editor — freeGet Pro · $19