Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultCursorMesh Gradient Hero
Mega MenuBrowse all 182Row to Panel List
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Mesh Gradient Hero

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • three

Setup

npm i gsapregisterPlugin(three)

More like this

  • Hero
  • Fluid
  • Gradient
  • Canvas
  • WebGL

Features.

  • A full-screen hero over a soft mesh gradient of up to eight colour points
  • The points wander on slow orbits, so the gradient never sits still
  • Move the pointer through it and the colours stir like a fluid, curling into eddies
  • Every stir heals slowly back into the mesh
  • Colours come from CSS variables, so any CSS colour works
  • Runs at a fixed 60 steps a second on any screen, and pauses while it's off screen
  • Shows a still CSS gradient of the same colours until the canvas runs, without WebGL, and while a lost context is away; the canvas comes back with the context
  • Links and buttons in the content just work, and the stir still follows the pointer over them
  • Respects prefers-reduced-motion: one still frame of the mesh, no stir

How to get it right.

Load GSAP and three.js first

The script reads window.gsap (only for its ticker) and window.THREE. Load both before code.js. Without them the CSS gradient stays.

Pick colours that sit close together

The mesh blends every point into every other, so three to five related colours look richest. Mix one dark colour in to give the light ones depth; the default is two oranges and a near-black.

Add more points with variables

Set --msg-colour-4 up to --msg-colour-8 on the root for more points. Every one that is set is used. The CSS fallback only paints the first three.

Keep the text readable

A soft shade, --msg-scrim, sits behind the text. Check contrast against your lightest colour, and strengthen the scrim or darken --msg-colour-2 if the text washes out.

A sentence is optional

It ships with the heading alone. To add a line, put <p class="msg_text"> after the heading, or pass text in React.

Tune the fluid

data-au-push sets how hard the pointer shoves, data-au-swirl how much the stir curls, and data-au-heal how fast it settles back. data-au-speed sets the orbit speed; 0 holds the mesh still and stops the loop once it settles, but the stir still works.

Variations.

  • Embers — the default: #eb5e28, #f68e66, #403d39
  • Deep heat — --msg-colour-2: #eb5e28 for a darker, redder wash
  • Paper — --msg-colour-2: #fffcf2; --msg-colour-3: #e6e0d3 with --msg-fg: #252422; --msg-muted: #55524c; --msg-scrim: rgba(255, 252, 242, 0.5)
  • Lazy smoke — data-au-swirl="4", data-au-heal="0.015" so stirs linger
  • Still canvas — data-au-speed="0": the mesh holds and only the pointer moves it

Where it fits.

  • Landing heroes — a calm, living first screen behind one line of type
  • Product launches — brand colours that react when people arrive
  • Event and music pages — a moody backdrop that rewards moving around
  • Section breaks — a full-screen pause between long reads

Frequently asked.

That's the fallback, or reduced motion. three.js isn't loaded, WebGL isn't available or its context was lost, or the visitor asked for less motion.

Partly. The stir follows pointer events, and the browser cancels those as soon as a finger starts scrolling the page, so touch gives a short stir. The drift runs the same everywhere.

Yes. Set the new --msg-colour-* values on the root and call window.au.MeshGradient.refresh(el).

The simulation runs on small textures (128² and 256²) and stops while the hero is off screen, and at speed 0 once it has settled. On a full-screen canvas the last pass is the main cost; DPR is capped at 2.

Related components.

Free

Dither Reveal Cursor

Cursor

Pro

Cursor Push Tags

Cursor

Free

Dither Trail Cursor

Cursor