🦃 Thanksgiving pricing is live: save $50 on Starwind Pro lifetime access.

Voronoi

Free

An animated Voronoi cell pattern with smooth edges, adjustable gaps, and an inner glow. Adapted from Voronoi by Paper Shaders (shaders.paper.design) under the Apache 2.0 license.

Upgrade to Pro
Loading code...

Starwind Dependencies

Sign in to view code and copy install commands.

Sign in

This component requires Starwind Pro.

Get lifetime access to all premium components, updates, and priority support.

Upgrade to Pro

Failed to load code. Please try again.

Code

Usage
<ShaderVoronoi
  cellColor1="#ff8247"
  cellColor2="#ffe53d"
  cellColor3="#ff8247"
  cellColor4="#ffe53d"
  cellColor5="#ff8247"
  gapColor="#2e0000"
  glowColor="#ffffff"
  cellColorCount={2}
  cellOpacity1={1}
  cellOpacity2={1}
  cellOpacity3={1}
  cellOpacity4={1}
  cellOpacity5={1}
  cellColorSteps={3}
  cellDistortion={0.4}
  gapWidth={0.04}
  glowStrength={0}
  cellSpeed={0.5}
  graphicScale={0.5}
  graphicRotation={0}
  graphicOffsetX={0}
  graphicOffsetY={0}
/>

Props

proptypedefaultdescription
cellColorCount number 2 Number of active cell colors, from 1 to 5.
cellColor1 string #ff8247 Cell color 1 as a CSS color.
cellOpacity1 number 1 Opacity of cell color 1, from 0 to 1.
cellColor2 string #ffe53d Cell color 2 as a CSS color.
cellOpacity2 number 1 Opacity of cell color 2, from 0 to 1.
cellColor3 string #ff8247 Cell color 3 as a CSS color.
cellOpacity3 number 1 Opacity of cell color 3, from 0 to 1.
cellColor4 string #ffe53d Cell color 4 as a CSS color.
cellOpacity4 number 1 Opacity of cell color 4, from 0 to 1.
cellColor5 string #ff8247 Cell color 5 as a CSS color.
cellOpacity5 number 1 Opacity of cell color 5, from 0 to 1.
glowColor string #ffffff Tint of the inner shadow in each cell. Needs glow above 0. Accepts any CSS color.
gapColor string #2e0000 Color of the gaps between cells. Accepts any CSS color.
cellColorSteps number 3 Number of steps between base colors. Needs 2 or more colors. Range 1 to 3.
cellDistortion number 0.4 How far noise moves the cell centers. Range 0 to 0.5.
gapWidth number 0.04 Width of the gap between cells. Range 0 to 0.1.
glowStrength number 0 Strength of the inner shadow in each cell. Range 0 to 1.
cellSpeed number 0.5 Animation speed. 0 stops the animation. Range 0 to 2.
graphicScale number 0.5 Overall zoom level of the graphic.
graphicRotation number 0 Rotation of the graphic in degrees.
graphicOffsetX number 0 Horizontal offset of the graphic center.
graphicOffsetY number 0 Vertical offset of the graphic center.
graphicFit "none" | "contain" | "cover" none How the graphic fits the canvas.
opacity number 1 Sets the overall opacity of the shader wrapper.
maxDpr number 1.5 Caps device pixel ratio for sharper output without runaway GPU cost.
maxFps 30 | 45 | 60 60 Caps the animation frame rate for performance-sensitive pages.