Glass
Fluted glass over indigo, pink and peach, with chromatic edges.
preset="glass"
Animated gradients for any website · v1.0
Fluted glass, liquid chrome, oil slick, caustics, prism light and twelve more moving backgrounds, or your own colors. WebGL shaders you paste in with a script tag, or use as a React or Framer component. Grain, distortion, mouse and still frames included.
One-time payment · Instant download · Single-project license · Free v1.x updates
Each card is the real component, as a still frame. Hover (or focus) one to play it. Use any of them with preset="glass", then change the colors to your own.
Fluted glass over indigo, pink and peach, with chromatic edges.
preset="glass"
Liquid metal with studio reflections, black to white.
preset="chrome"
Thin-film rainbow bands drifting over blue-black.
preset="oilslick"
Sunlight through water, rippling over a deep teal floor.
preset="caustics"
A white beam fanning out into a full spectrum.
preset="prism"
Light rays pouring through haze from above.
preset="godrays"
Grainy, gooey blobs that merge and split on black.
preset="blobs"
An ordered-dither sunset, in chunky retro pixels.
preset="retro"
Northern-light curtains in cyan, violet and green over night blue.
preset="aurora"
The soft, Stripe-style mesh gradient: five colors drifting into each other.
preset="mesh"
Slow molten blobs in crimson, orange and amber.
preset="lava"
Light folds of sand, lavender and blush, with a soft sheen.
preset="silk"
Plum, rose, coral and gold, flowing like warm smoke.
preset="sunset"
Deep navy to sea foam, in slow currents.
preset="ocean"
Iridescent pastels, like holographic foil.
preset="holo"
Pink, violet and peach curtains on a dusk-blue sky.
preset="dusk"
Black-to-white silk for type-led, editorial pages.
preset="mono"
Single-project license (LICENSE.md in the download): one website or project per license.
Upload shader-gradients.min.js from the download to your site.
Add the script once, and a <pf-gradient> tag wherever you want a gradient.
Pick a preset, or set your own colors, speed, grain and more as attributes.
<script src="/shader-gradients.min.js" defer></script>
<pf-gradient preset="glass" style="height: 600px"></pf-gradient>Paste script/webflow/footer-code.html from the download into Site settings → Custom code → Footer code (or host the .js file and add its script tag there).
Add a Code Embed element with a <pf-gradient> tag where you want the gradient.
Give it a height, and publish. Custom code runs on the published site.
<pf-gradient preset="mesh" colors="#7c3aed, #06b6d4, #f43f5e" style="height: 600px"></pf-gradient>Custom code needs a paid Webflow site plan.
Upload shader-gradients.min.js to your Media library or your theme, and copy its URL.
Add a Custom HTML block with the script tag and a <pf-gradient> tag.
<script src="https://your-site.com/wp-content/uploads/shader-gradients.min.js" defer></script>
<pf-gradient preset="ocean" style="height: 500px"></pf-gradient>On WordPress.com, you need a plan that allows custom code.
Online Store → Themes → Edit code → Assets: upload shader-gradients.min.js.
In the theme editor, add a Custom Liquid section with the script and the tag.
<script src="{{ 'shader-gradients.min.js' | asset_url }}" defer></script>
<pf-gradient preset="holo" style="height: 600px"></pf-gradient>Copy react/ShaderGradient.tsx into your project. It needs only React 18+.
Render it with a preset or your own props. Children sit on top of the gradient.
import ShaderGradient from "./ShaderGradient"
<ShaderGradient preset="glass" style={{ height: 600 }}>
<h1>Your headline</h1>
</ShaderGradient>Next.js: the server renders a CSS gradient in the same colors, then the shader takes over.
In your Framer project, go to Assets → Code → + → New component file, and name it ShaderGradient.
Replace the file's contents with framer/ShaderGradient.tsx from the download, and save.
Drag ShaderGradient onto the canvas, pick a preset (or Custom for your own colors), and press Preview.
On the Framer canvas you see a still frame, which keeps the editor fast. Set On Canvas to Live to see it move there.
Squarespace and Wix: add the script and the tag in a Code or Embed block (your plan must allow custom code). The download's README has a quick start for every platform and the full settings reference.
$12 one-time
Secure checkout by Polar. Instant download after payment.
Anywhere you can add a script tag: Webflow, WordPress, Shopify, Squarespace, Wix, plain HTML. Also React/Next.js and Framer. Site builders need a plan that allows custom code.
No. You paste one snippet and pick a preset. Colors and the rest are HTML attributes, or Framer's panel.
The script is 10.4 KB gzipped. It renders one shader at 1x resolution on the GPU, lowers its resolution on slow devices, and pauses offscreen and in background tabs.
Yes. It's WebGL 1, which every current phone browser supports, and it falls back to a Canvas 2D gradient where WebGL is off.
Yes. Put your content inside the tag (or the React component), and it renders over the gradient. The gradient is decorative and hidden from screen readers.
Visitors with Reduce Motion turned on see a still frame. You can also set a static frame for everyone.
Single project: one website or project per purchase. The details are in LICENSE.md in the download.
Yes, free updates for v1.x.
Email hi@gunnargray.com.
The launch, new presets, v1.x releases and the occasional new tool. No more than that.