DitherAurora

The aurora effect with all fifteen of its knobs typed.

Preview

Installation

pnpm add astro-dither

Or copy the source into your project: npx astro-dither add aurora

Usage

---
import { DitherAurora } from "astro-dither";
---

<DitherAurora />

The signature look: folding curtains of light. This wrapper gives you the aurora's full param set as typed props instead of a params object.

Props

PropTypeDefaultDescription
curtainsnumber3How many curtains. Each hangs higher and dimmer.
heightnumber0.42Where the lowest bright edge hangs, 0 to 1.
spreadnumber0.05Vertical gap between curtains.
swaynumber1How far the edges fold.
turbulencenumber0.6Fine ripples along each edge.
raysnumber8How many rays fit across.
lengthnumber0.45How far the rays reach up.
glownumber0.9Brightness of the line along each edge.
intensitynumber0.95Overall curtain brightness.
shimmernumber0.2A slow brightness ripple.
scalenumber1Horizontal zoom.
tiltnumber0Tilt in degrees.
driftnumber0Sideways travel.
direction1 | -11-1 hangs the rays from a bright top edge.
masknumber00 none, 1 fades top, 2 fades bottom, 3 fades sides.
palettestring[]the effect's2 to 8 colours, paper first, brightest last. transparent works.
cellnumber2Size of one dither cell in CSS pixels, 1 to 8.
matrix2 | 4 | 8 | "noise"8The Bayer threshold size, or noise for a random look.
speednumber1Playback speed. 0 draws one still frame.
classstringundefinedClasses on the surface element, for size and position.

Notes

  • Decorative surfaces render aria-hidden. Put real text on top, not inside them.
  • With reduced motion it draws one still frame and stops.
  • It pauses when scrolled out of view or when the tab is hidden.