Backgrounds

Line Waves

A stack of thin lines undulating like a sound wave. The pointer parts the lines around it.
import { LineWaves } from "pleate/effects/line-waves";

Behind a headline

Every line a frequency

Props

lines

Number of lines.

numberdefault 28

amplitude

Height of the waves.

numberdefault 1

colors

CSS colors or tokens: bottom and top lines. 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.