Swirl

Installation

npm i @paper-design/shaders-react

Code

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

<Swirl
  style={{ height: 500 }}
  colorBack="#330000"
  bandCount={4}
  twist={0.1}
  softness={0}
  noiseFrequency={0.32}
  noise={0.32}
  offsetX={0}
  offsetY={0}
  scale={1}
  rotation={0}
  speed={0.32}
  colors={["#cc3333","#cc9933","#99cc33"]}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorsUp to 10 colors used for the stripesstring[]Hex, RGB, or HSL color
bandCountNumber of color bands (0 for concentric ripples)number0 to 15 (integer)
twistVortex power (0 = straight sectoral shapes)number0 to 1
softnessColor transition sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
noiseStrength of noise distortion (not effective with noiseFrequency = 0)number0 to 1
noiseFrequencyNoise frequency (not effective with noise = 0)number0 to 1
offsetXHorizontal offset of the graphics centernumber-1 to 1
offsetYVertical offset of the graphics centernumber-1 to 1
scaleOverall zoom level of the graphicsnumber0.01 to 4
rotationOverall rotation angle of the graphicsnumber0 to 360
speedAnimation speednumber0 to 2

Description

Animated bands of color twisting and bending, producing spirals, arcs, and flowing circular patterns