Notes on moving gradients
How-tos and deep dives on animated backgrounds for React and shadcn/ui. The docs cover the components; these posts cover putting them to work.
- CSS animated backgrounds: 6 effects and what each costsSix animated backgrounds in pure CSS (sliding gradient, drifting blobs, conic glow, hue cycle, stripes, grain), with a Chrome trace of which ones repaint.
- Conic gradients in CSS: angles, pie charts and colour wheelsHow CSS conic-gradient() works: the start angle and the seam, hard-stop pie charts, colour wheels that keep their lightness, checkerboards and progress rings.
- Linear gradients in CSS: angles, corners and the gradient lineHow CSS linear-gradient() works: angles and to-corner keywords, how long the gradient line is, stops, hints, stripes and Tailwind v4.
- Radial gradients in CSS: shapes, size keywords and glowsHow CSS radial-gradient() works: circles and ellipses, the four size keywords, rings, dots and glows.
- Red gradients in CSS: palettes, hex codes and blends that stay redRed gradient palettes with hex codes, why red turns pink as it fades and maroon as it darkens, and how to blend red in CSS.
- Gradient backgrounds for websites: full-page CSS, frosted cards and brand coloursHow to add a gradient background to a website: full-page CSS without stripes, frosted cards that keep text readable, a page gradient from one brand colour, and smooth scrolling.
- Green gradients in CSS: palettes, heatmap scales and success buttonsGreen gradient palettes with hex codes, a heatmap scale colour-blind readers can follow, success buttons that pass contrast, and how to blend green in CSS.
- Purple gradients in CSS: palettes, hex codes and blends that stay violetPurple gradient palettes with hex codes, why violet turns pink or blue as it fades, and how to blend it in CSS.
- Blue gradients in CSS: palettes, chart fills and navy heroesBlue gradient palettes with hex codes, chart area fills that work in dark mode, navy hero glows, and why blue drifts purple as it fades.
- Pastel gradients in CSS: palettes, avatar gradients and soft blendsPastel gradient palettes with hex codes, avatar gradients picked from a name, card edges that show, and blends that stay soft.
- Sunset gradients in CSS: palettes, hex codes and a setting sunSunset gradient palettes with hex codes, CSS that keeps the middle from going muddy, and an animated sun.
- Metallic gradients in CSS: chrome, gold, copper and rose goldCSS recipes with hex codes for chrome, gold, copper and rose gold, plus brushed metal and a sheen.
- Ordered dithering in a shader: Bayer matrices for gradientsHow Bayer dithering works, a tested GLSL shader to paste, and when noise beats it for gradient banding.
- uiGradients alternatives for CSS and animated gradientsGradient collections, CSS generators and live components to use instead of uiGradients, and when to keep it.
- WebGPU vs WebGL2 for UI backgroundsWhether WebGPU makes an animated gradient faster than WebGL2, with frame times from one engine running both, browser support and a fallback plan.
- CSS gradient vs WebGL gradient: which one for an animated backgroundWhen a CSS gradient is enough, when WebGL is worth it, and what each costs, with a Chrome paint trace.
- ShaderGradient alternatives for animated gradientsLighter React libraries, no-code editors and video exporters to use instead of ShaderGradient, and when to keep it.
- Grainient alternatives for gradient backgroundsFree and paid alternatives to Grainient, from grainy mesh generators to live gradients you install in code.
- How to make a mesh gradient in CSS and ReactThree ways to build a mesh gradient: stacked radial gradients in CSS, a static image, or a live WebGL component.
- How to add film grain to a gradient on a websiteGrainy gradients with an SVG noise tile in CSS or per-pixel grain in a shader, and what each costs.
- How to make a gradient follow light and dark modeTheme-aware gradients with CSS variables and light-dark(), and the catch for canvas and WebGL.
- React libraries for animated gradient backgrounds, comparedPaper Shaders, Hazeglow, ShaderGradient, NEAT and more, with measured bundle sizes and trade-offs.
- Animated gradient backgrounds in Tailwind CSSAnimate a gradient background in Tailwind v4 with one keyframe, blurred blobs, or a live shader.
- Background video vs animated gradient: what a hero costsMeasured file sizes for hero background videos, why grain makes them huge, and when a live gradient wins.
- How to make a seamless looping gradient animationWhy gradient loops jump, and how to build one that doesn't in CSS or in a shader.
- CSS gradient text in plain CSS and Tailwind, static and animatedMake gradient text with background-clip: text in plain CSS or Tailwind, animate it with one keyframe, or fill it with a live shader.
- Stripe gradient animation in React: how it works and how to build itHow the copied Stripe Gradient.js really draws its gradient, what it leaves out, and a maintained React version with a slanted edge.
- Aurora background effect in ReactAdd a moving northern-lights background to a React or Next.js section in your own colours.
- Export an animated gradient as a seamless MP4 loopTurn a moving gradient into an MP4 that loops with no seam, then use it on the web, in slides or in a video edit.
- Gradient borders in CSS and Tailwind, static and animatedWhy border-color can't take a gradient, and four fixes: border-image, the padding-box trick, a mask for a see-through inside, and a spinning conic ring.
- Animated gradient background for shadcn/uiAdd a moving gradient background to a shadcn/ui or React app with one CLI command, in your theme colours.
Follow along with the RSS feed.