Spiral

Installation

npm i @paper-design/shaders-react

Code

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

<Spiral
  style={{ height: 500 }}
  colorBack="#001429"
  colorFront="#7ad1ff"
  density={1}
  distortion={0}
  strokeWidth={0.5}
  strokeTaper={0}
  strokeCap={0}
  noise={0}
  noiseFrequency={0}
  softness={0}
  offsetX={0}
  offsetY={0}
  scale={1}
  rotation={0}
  speed={1}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorFrontThe color of spiral shapestringHex, RGB, or HSL color
densitySpacing falloff simulating perspective (0 = flat spiral)number0 to 1
distortionPower of shape distortion applied along the spiralnumber0 to 1
strokeWidthThickness of spiral curvenumber0 to 1
strokeTaperhow much the stroke is loosing width away from center (0 = full visibility)number0 to 1
strokeCapExtra stroke width at the center (not effective with strokeWidth = 0.5)number0 to 1
noiseNoise distortion applied over the canvas (not effective with noiseFrequency = 0)number0 to 1
noiseFrequencyMoise frequency (not effective with noise = 0)number0 to 1
softnessColor transition sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
offsetXHorizontal offset of the spiral centernumber-1 to 1
offsetYVertical offset of the spiral 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

A single-colored animated spiral that morphs across a wide range of shapes - from crisp, thin-lined geometry to flowing whirlpool forms and wavy, abstract rings.