For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. The dithercn agent skill, for building any dither on the engine, is at /.well-known/agent-skills/dithercn/SKILL.md.
dithercn

Aurora

Curtains of light that fold, sway and shimmer, drawn as a dither, with knobs for colour, rays, tilt and drift.

Controls
Edge colour
Tip colour
Curtains3
Height0.42
Spread0.11
Sway1
Turbulence0.6
Rays8
Ray length0.45
Edge glow0.9
Tilt0°
Drift0
Rays point
Mask
Matrix
Cell3px
Animate

Installation

pnpm dlx shadcn@latest add https://dithercn.dev/r/aurora.json

Usage

import { Aurora } from "@/components/dithercn/aurora";
 
export function Hero() {
  return (
    <section className="relative isolate min-h-[480px]">
      <Aurora className="absolute inset-0 -z-10" />
      <h1>Your headline</h1>
    </section>
  );
}

Each curtain has a bright lower edge that folds slowly, with rays that fade as they rise. Further curtains hang higher and dimmer. height sets where the lowest edge hangs, so you can keep the area under it clear for text.

The props group into three jobs:

  • Shape: curtains, height, spread, sway, turbulence, rays, length.
  • Light and colour: color for the edges, tipColor for the tops of the rays, background, glow, intensity, shimmer. Pass palette to set every tone yourself.
  • Placement and motion: tilt, scale, drift, direction, mask, plus the engine's speed, cell and matrix.

Examples

Above a headline

Raising height lifts the curtains off the lower third, where the headline sits on clean paper. A tipColor of "blue" shifts the tops of the rays to a second, cooler hue, and mask="edges" fades the sides.

Northern lights

Your own colours turn it into the real thing: green edges, violet tips and a night-sky background. Four curtains, longer rays, a slight tilt and a little drift give it depth.

Hanging over a call to action

direction="down" flips the curtains so the rays fall from the top and the button sits on clear paper below. Few broad rays and 4px cells give it a coarser, poster-like grain.

Still, in a banner

With animate={false} it draws one frame. stillTime picks which moment, so you can choose a shape you like.

Props

PropTypeDefault
color

The bright lower edge of each curtain.

Type: DitherColorDefault "--dither-ink"
tipColor

The faint tops of the rays. Set a second colour for a two-tone sky.

Type: DitherColorDefault color
background

The sky behind.

Type: DitherColorDefault "--dither-paper"
curtains

How many curtains, from 1 to 6. Each one hangs higher and dimmer.

Type: numberDefault 3
height

Where the lowest bright edge hangs, from 0 (bottom) to 1 (top).

Type: numberDefault 0.42
spread

Vertical gap between curtains, from 0 to 0.3.

Type: numberDefault 0.11
sway

How far the edges fold. 0 is straight, 3 is deep folds.

Type: numberDefault 1
turbulence

Fine ripples along each edge, from 0 to 2.

Type: numberDefault 0.6
rays

How many rays fit across. 2 gives broad bands, 20 fine needles.

Type: numberDefault 8
length

How far the rays reach up, from 0 to 1.

Type: numberDefault 0.45
glow

Brightness of the line along each edge, from 0 to 2.

Type: numberDefault 0.9
intensity

Brightness of the curtains, from 0 to 1.

Type: numberDefault 0.95
shimmer

A slow brightness ripple, from 0 to 1.

Type: numberDefault 0.2
scale

Horizontal zoom. Higher values fit more folds across.

Type: numberDefault 1
tilt

Tilt of the curtains in degrees, from -45 to 45.

Type: numberDefault 0
drift

Sideways travel, from -2 (left) to 2 (right).

Type: numberDefault 0
direction

"down" flips it so the rays hang from a bright top edge.

Type: "up" | "down"Default "up"
mask

Fades it to paper where your text sits.

Type: "none" | "top" | "bottom" | "edges"Default "none"
palette

Takes over the colours: paper first, brightest last. Palette names, CSS variable names or any CSS colour.

Type: [DitherColor, DitherColor, ...DitherColor[]]Default Built from the colour props
matrix

The threshold pattern. See Dither engine.

Type: "bayer2" | "bayer4" | "bayer8" | "blue-noise"Default "bayer8"
levels

Tones the field snaps to before dithering. Low values give hard steps.

Type: numberDefault All the matrix can draw
cell

Size of one dither cell in CSS pixels.

Type: numberDefault --dither-cell
speed

How fast it moves.

Type: numberDefault 1
animate

false draws one still frame.

Type: booleanDefault true
stillTime

The moment drawn when motion is off or reduced, in seconds.

Type: numberDefault 0
className

Size and position. The background fills this box.

Type: stringDefault –

Notes

  • It is decorative and hidden from assistive technology. Put real text on top of it, not inside it.
  • With reduced motion turned on, it draws one still frame and stops.
  • It pauses when scrolled out of view or when the tab is hidden, and releases its WebGL context when far offscreen. Without WebGL it shows a CSS approximation in the same colours.
  • It costs one small draw per frame at 30 fps, at one pixel per dither cell. More curtains cost a little more per pixel. See Performance.