Gradient mesh
FreeSoft color fields that drift under a grain layer.
When to use
- A page background or hero wash where a flat color feels empty.
- A section that should move slowly and stay out of the way of the type.
When not to use
- Behind small text or form fields. The fields keep shifting contrast.
- A brand surface that must be one flat color in screenshots.
Usage
- Copy the prompt and name four colors, the blur, and the grain opacity.
- Put the mesh behind the section and the copy in a layer above it.
- Respect reduced motion by holding the fields on one frame.
example.tsx
1import { GradientMesh } from "@/effects/gradient-mesh";2 3export function Preview() {4 return (5 <div className="h-64">6 <GradientMesh />7 </div>8 );9}