Backgrounds

Lissajous

A phosphor oscilloscope tracing Lissajous figures. The beam dwells on one frequency ratio, then retunes to the next by sliding both frequencies continuously, and the chirp while the figure comes apart and re-locks is the same thing you see turning a real scope's timebase knob. Persistence is data, not paint. Instead of the classic translucent-fill fade, which never fully clears and cannot survive a paused repaint, the beam keeps a ring buffer of recent samples and redraws the whole trail from scratch each frame, so the phosphor hold re-grades live when you tune it and a still frame reproduces the exact screen.

Install

# Lissajous needs no npm packages

Then copy 2 files into your project:

  • components/registry/lissajous/lissajous.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
speednumber1Beam speed along the curve.
persistencenumber0.6Phosphor hold — how long the trail stays lit behind the beam.
dwellnumber4Seconds a figure holds before tuning to the next ratio.
morphSecondsnumber1.4Length of the chirp between one ratio and the next.
beamWidthnumber1.6Trace stroke width.
glownumber12Bloom on the beam head.
showGraticulebooleantrueFaint scope grid behind the trace.
phosphorColorstring (hex)"#c4b5fd"The phosphor — amethyst, not heritage green.
backgroundColorstring (hex)"#0b0812"Dead glass behind the trace.

What It Demonstrates

Loop
An animation that repeats, a set number of times or infinitely.
Idle animation
Subtle motion that plays while an element is just sitting there, waiting to be interacted with.
Interpolation / Tween
Generating all the in-between frames between a start and end value, so motion is continuous.
Morph
One shape smoothly turns into another shape, e.g. Dynamic Island.

Related Components

Appears In