Skip to content
PixiKit

Lightning Bolt

Crawling bolts of lightning with glowing fog, branches and flicker that bend toward the cursor and strike where you click.

pixikit.com/docs/effects/lightning-bolt

Customize

Color
Bolts1
Spread0.60
Branches0.50
X offset0.00
Angle0
Size1.00
Thickness1.00
Glow1.00
Intensity1.00
Speed1.00
Flicker0.60
Mouse interaction
Mouse strength1.00
Click strike
Intro
Fade0.00
Opacity1.0
Light mode
Paused

Props

23
NameTypeDefaultDescription
colorstring"#4d6bff"Color of the lightning. The hottest parts glow white.
boltsnumber1How many bolts to draw, from 1 to 4.
spreadnumber0.6Space between bolts when there is more than one.
branchesnumber0.5How many side branches split off and flash along the bolts, from 0 to 1.
xOffsetnumber0Moves the bolts sideways.
anglenumber0Tilts the bolts, in degrees. 90 runs them across.
sizenumber1Scale of the jagged path. Higher is more crooked.
thicknessnumber1Thickness of the bright core.
glownumber1How far the glow spreads around the bolts.
intensitynumber1Overall brightness.
speednumber1How fast the bolts crawl. The motion loops seamlessly every 10 seconds at 1.
flickernumber0.6Strength of the flicker and sudden flashes, from 0 to 1.
mouseInteractionbooleantrueBolts bend toward the cursor, crackle and grow extra branches near it.
mouseStrengthnumber1How strongly the bolts bend toward the cursor.
clickStrikebooleantrueClicking calls down a bolt that strikes the spot and briefly flashes the others.
introbooleantrueLets the bolts descend from the top on first load.
fadenumber0Fades the edges into the page, from 0 to 1.
opacitynumber1Opacity of the whole effect.
lightModebooleanfalseDraws the lightning as crisp ink strokes for light backgrounds.
pausedbooleanfalseFreezes the animation.
dprnumberNoneMaximum device pixel ratio, capped at 2.
classNamestringNone
styleCSSPropertiesNone

More background effects in Pro

View all

Related