astro-dither is a set of Astro components on a small WebGL engine. It draws ordered-dithered fields, a Bayer threshold over a GLSL field function, in any palette you give it. Everything ships as source you can read: no React, no hydration framework, no build plugin.
What is in the package
Ditherrenders Paper’s animated dither shapes: sphere, warp, wave, ripple, swirl, dots.DitherImageapplies ordered dithering to a photograph. It keeps the realimgand its alt text.DitherGradient,DitherAuroraandDitherGlobeare named looks with typed props.DitherEffectrenders any of the 19 effects in the registry with one consistent API.
What you get
- One shared WebGL context for every ordered-dither surface on a page.
- Bayer 2x2, 4x4 and 8x8 matrices, or a noise threshold.
- Palettes of 2 to 8 CSS colours, including
transparent. - Surfaces pause offscreen and in hidden tabs, and respect
prefers-reduced-motion. - A copy-source CLI,
npx astro-dither add, for projects that want the code in their own repo.
Where to next
Install the package, browse the effect catalog, or read how the engine works.