Meridian Labs · Spring release

Plan the quarter in an afternoon

One board for goals, owners and dates. Everyone sees the same plan.

Code

<!-- mesh-gradient.free.js: download it from the Install section below and host it with your site -->
<script src="/mesh-gradient.free.js" defer></script>

<mesh-gradient
  theme="light"
  speed="1"
  grain="0.5"
  style="display:grid; place-items:center; min-height:420px; border-radius:24px"
>
  <h1>Plan the quarter in an afternoon</h1>
</mesh-gradient>

In context

Team plan$18 / seatBilled yearly, cancel any time
Behind a pricing card
Good evening, Mira3 reviews are waiting for you
Sunset Pro
Release notesVersion 4.2 · 12 changes
Mono, held still Pro

Install · Free Web Component

One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.

1. Install with one command — or download the file
shadcn CLI · React
npx shadcn@latest add https://www.ui-design.co/r/mesh-gradient.json
2. Load it and use the element
HTML
<!-- mesh-gradient.free.js: download it from the Install section below and host it with your site -->
<script src="/mesh-gradient.free.js" defer></script>

<mesh-gradient
  theme="light"
  speed="1"
  grain="0.5"
  style="display:grid; place-items:center; min-height:420px; border-radius:24px"
>
  <h1>Plan the quarter in an afternoon</h1>
</mesh-gradient>
3. React + TypeScript (optional)

The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:

TypeScript
// mesh-gradient.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    'mesh-gradient': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
      theme?: 'light' | 'dark';
      speed?: number | string;
      grain?: number | string;
      interactive?: 'true' | 'false';
    };
  }
}

Pro · React + TypeScript Pro

One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.

  • React component with TypeScript types and the full shader source
  • Sunset, Mint and Mono tints, plus custom tints from Brand Fit
  • The vanilla Web Component with every tint, a demo page, README and license

Attributes & props

NameTypeDefaultDescription
theme 'light' | 'dark''light'Luminous pastel on near-white, or deep saturated colour on near-black. Also sets the text colour of the content.
speed number1How fast the pools drift. 0 holds the gradient still (the grain stops too).
grain number 0–10.5Amount of film grain. Even at 0 a faint dither stays, so the ramps never band.
interactive 'true' | 'false''true'The pools lean gently toward the pointer while it is over the element.
tint Pro'aurora' | 'sunset' | 'mint' | 'mono' | object'aurora'The colours of the pools, or a custom tint. Mono is a quiet pearl on light and graphite on dark. Free build ships Aurora only.

The element is a block that fills whatever size you give it — set a height, min-height or put it in a grid cell — and its children render on top, so lay them out with display: grid or flex on the element itself. A border-radius on it rounds the gradient. It is drawn at one sample per CSS pixel and capped for page-size areas, pauses off-screen and in hidden tabs, and under prefers-reduced-motion shows one still frame. Without WebGL (and before the script loads) a CSS gradient in the same colours stands in. The background is decoration: it is hidden from screen readers and never takes pointer events from your content. Check the contrast of small text over the brightest pool.

More components