syaivoalpha

Dither

Gradients dissolve through ordered dithering patterns. The raw texture of pixels, elevated into motion.

Preview

Usage

import { createDither } from "syaivo";

const effect = createDither({
  colors: ["#c084fc", "#818cf8", "#38bdf8", "#2dd4bf"],
  pixelSize: 4,
  pattern: "bayer",
  angle: 135,
});

effect.mount(document.getElementById("hero")!);

Options

OptionTypeDefaultDescription
colorsstring[]Purple → blue → tealGradient color stops
backgroundColorstring"#0a0a0a"Canvas background
pixelSizenumber4Size of each dither block (px)
pattern"bayer" | "dots""bayer"Dithering pattern
anglenumber135Gradient angle in degrees
noiseIntensitynumber0.3Noise distortion amount (0–1)
speednumber1Animation speed multiplier
animatedbooleantrueEnable animation
respectReducedMotionbooleantrueHonor prefers-reduced-motion

Dynamic Updates

effect.update({ pixelSize: 6, pattern: "dots" });

Example

Introducing your product

Build something
people remember

A polished experience starts with the details. Ship interfaces that feel considered from the first pixel.

Get startedDocumentation

On this page