Backgrounds

Lightning

A flickering electric bolt with a soft glow that follows the pointer across.
import { Lightning } from "pleate/effects/lightning";

Behind a headline

Strike while it is bright

Props

intensity

Brightness of the bolt and its glow.

numberdefault 1

x

Horizontal position, -1 (left edge) to 1 (right edge).

numberdefault 0

colors

CSS colors or tokens: the bolt. Defaults follow the palette.

string[]

speed

Playback speed.

numberdefault 1

scale

Pattern size; above 1 is bigger.

numberdefault 1

interactive

React to the pointer over the parent.

booleandefault true

Accessibility

  • Decorative: the canvas is aria-hidden and ignores pointer events, so content on top stays usable.
  • Pauses off screen and in hidden tabs; with reduced motion it shows a still frame.
  • Fills its parent: give the parent position relative and the background absolute inset-0.