Skip to main content
Animated bands of color twisting and bending, producing spirals, arcs, and flowing circular patterns. Supports up to 10 colors with adjustable twist, center, and noise distortion.

React Usage

Vanilla JavaScript Usage

Parameters

string
default:"'#330000'"
Background color in hex format.
string[]
default:"['#ffd1d1', '#ff8a8a', '#660000']"
Array of up to 10 stripe colors in hex format.
number
default:"4"
Number of color bands. Set to 0 for concentric ripples. Range: 0 to 15.
number
default:"0.1"
Vortex power controlling the spiral effect. 0 creates straight sectoral shapes. Range: 0 to 1.
number
default:"0.2"
Distance from the center where swirl colors begin to appear. Range: 0 to 1.
number
default:"0.5"
Blend point between colors, where 0.5 equals equal distribution. Range: 0 to 1.
number
default:"0"
Color transition sharpness. 0 creates hard edges, 1 creates smooth gradients. Range: 0 to 1.
number
default:"0.2"
Strength of noise distortion. No effect when noiseFrequency is 0. Range: 0 to 1.
number
default:"0.4"
Frequency of noise distortion. No effect when noise is 0. Range: 0 to 1.
number
default:"0.32"
Animation speed multiplier. Set to 0 to pause animation.
number
default:"0"
Specific frame to display when speed is 0.

Common Sizing Parameters

number
default:"1"
Overall zoom level of the graphics. Range: 0.01 to 4.
number
default:"0"
Rotation angle in degrees. Range: 0 to 360.
'none' | 'contain' | 'cover'
default:"'contain'"
How to fit the shader into the canvas dimensions.
number
default:"0"
Horizontal offset of the graphics center. Range: -1 to 1.
number
default:"0"
Vertical offset of the graphics center. Range: -1 to 1.

Presets

The Swirl shader comes with several built-in presets:
  • Default: Red and pink gradient swirl
  • 007: James Bond-inspired gun barrel effect
  • Opening: Warm orange iris opening effect
  • Candy: Bright pastel rainbow swirl