Gradients
that feel alive.
A WebGL gradient component for React. Twenty shaders, one prop to move between them, and nothing else to install.
Now playing
default
01/12
type="aurora"The collection
20 shaders, 22 presets.
Each one is a hand-written fragment shader driven by the same three colors. Every tile below is live, and all of them share a single WebGL context.
aurora
Curtains of light over a dark sky.
eclipse
A ring of light around a dark disc.
prism
One band field, split three ways.
horizon
A soft glow rising from the bottom edge.
caustics
Light through moving water.
glass
A soft field behind fluted glass.
nebula
Warped dust clouds and a star field.
dunes
Ridgelines drifting at their own pace.
silk
Folded, iterated sine cloth.
fold
Sheets of light, creased and overlapping.
rays
Shafts of light from above.
topo
A contour map that keeps redrawing.
mesh
Three blobs of color, always blending.
halftone
A rotated dot screen, print style.
smoke
Turbulent, slow-rolling plumes.
animated
A rotating two-layer blend.
wave
Stacked sine waves across the frame.
stripe
Warped diagonal bands.
conic
A sweep around the center.
linear
A vertical ramp with a gentle sway.
What is new
Rebuilt from the triangle up.
The renderer was rewritten for this release. It is smaller, it survives things the old one did not, and it learned a few tricks.
preset="spectrum"It morphs. It never cuts.
Change the type, the colors or the speed and the canvas blends there over a noise front, at whatever duration you set.
It follows the pointer.
Set interactive and the pattern swells under the cursor. Try it on this card.
0
Dependencies.
Raw WebGL: one fragment shader and one triangle, 11 kB gzipped. The rendering library the last version shipped with is gone.
- Scrolled out of viewPaused
- Tab in the backgroundPaused
- Reduced motion requestedStill frame
- WebGL context lostRestored
Asleep when unseen.
The render loop only runs while someone can see it. No props, no observers to wire up.
Three colors in.
Every shader reads the same three colors, as hex strings or RGB objects, so a palette carries across all twenty.
Quick start
From install to a living background in a minute.
It is a client component that renders one canvas and fills its parent. Put it behind your content and it is done.
01Install
Source codebash02Put it behind something
hero.tsxtsx03Make it yours
Source codetsx
In an interface
Behind real UI, not just a hero.
A gradient earns its place when there is something on top of it. These are working components, and their source is one click away.
Studio
- Unlimited projects
- Custom domains
- Priority rendering
- Team seats included
Questions