Simplex Noise
Installation
npm i @paper-design/shaders-react
Code
import { SimplexNoise } from '@paper-design/shaders-react'; <SimplexNoise height={500} colors={["#cc3333", "#cc9933", "#99cc33", "#33cc33", "#33cc99"]} stepsPerColor={2} softness={0} scale={0.6} rotation={0} speed={0.5} />
Props
Name | Description | Type | Values |
---|---|---|---|
colors | Up to 10 base colors | string[] | Hex, RGB, or HSL color |
stepsPerColor | Number of extra colors between base colors (1 = N color palette, 2 = 2×N color palette, 3 = 3×N color palette, etc) | number | 1 to 10 (integer) |
softness | Color transition sharpness (0 = hard edge, 1 = smooth gradient) | number | 0 to 1 |
width | CSS width style of the shader element | number | string | — |
height | CSS height style of the shader element | number | string | — |
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 multi-color gradient mapped into smooth, animated curves, delivering a sleek, futuristic visual.