Mesh Gradient
Installation
npm i @paper-design/shaders-react
Code
import { MeshGradient } from '@paper-design/shaders-react'; <MeshGradient style={{ height: 500 }} distortion={0.8} swirl={0.1} offsetX={0} offsetY={0} scale={1} rotation={0} speed={1} colors={["#cc3333","#cc9933","#99cc33","#33cc33"]} />
Props
Name | Description | Type | Values |
---|---|---|---|
colors | Up to 10 color spots | string[] | Hex, RGB, or HSL color |
distortion | The power of organic noise distortion | number | 0 to 1 |
swirl | The power of vortex distortion | number | 0 to 1 |
offsetX | Horizontal offset of the graphics center | number | -1 to 1 |
offsetY | Vertical offset of the graphics center | number | -1 to 1 |
scale | Overall zoom level of the graphics | number | 0.01 to 4 |
rotation | Overall rotation angle of the graphics | number | 0 to 360 |
speed | Animation speed | number | 0 to 2 |
Description
A flowing interplay of color spots, moving along distinct trajectories and transformed by organic distortion