Mesh Gradient

API Reference

Complete API reference for Mesh Gradient core options, lifecycle methods, and update behavior.

API

What methods and properties are available in Mesh Gradient and how to use them.

Most configuration fields are modeled in TypeScript as MeshGradientOptions (plus init- and update-focused slices — see Advanced usage for how appearance, transition, and related fields apply).

MeshGradient

The main instance API.

import { MeshGradient } from '@mesh-gradient/core';

const gradient = new MeshGradient();

Prop

Type


MeshGradientOptions

Options for .init() and .update() methods.

import { MeshGradientOptions } from '@mesh-gradient/core';

const options: MeshGradientOptions = {
  colors: ['#000000', '#ffffff', '#000000', '#ffffff'],
};

Prop

Type


Init Options

Type MeshGradientInitOptions contains additional options for .init() method. Not used in .update() method.

Prop

Type


Update Options

Type MeshGradientUpdateOptions contains additional options for .update() method.

Prop

Type

On this page