Waves

Installation

npm i @paper-design/shaders-react

Code

import { Waves } from '@paper-design/shaders-react';

<Waves
  style={{ height: 500 }}
  colorBack="#000000"
  colorFront="#ffbb00"
  frequency={0.5}
  amplitude={0.5}
  spacing={1.2}
  proportion={0.1}
  softness={0}
  shape={0}
  scale={0.6}
  rotation={0}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorFrontThe color of wavy linesstringHex, RGB, or HSL color
shapeLine shape control: zigzag at 0, sine at 1, irregular waves at 2. Intermediate values morph gradually between these shapesnumber0 to 3
amplitudeWave amplitudenumber0 to 1
frequencyWave frequencynumber0 to 2
spacingThe space between every two wavy linesnumber0 to 2
proportionBlend point between front and back colors (0.5 = equal distribution)number0 to 1
softnessColor transition sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
scaleOverall zoom level of the graphicsnumber0.01 to 4
rotationOverall rotation angle of the graphicsnumber0 to 360

Description

Static line pattern configurable into textures ranging from sharp zigzags to smooth flowing waves