Dither Image

New

A photo redrawn in two colours, one dot at a time

$ npx @hritik-sharmaa/repeat-ui add image-dither-image
Category
Image
Added
Nov 1, 2026
Version
1.1.0
Packages
None
Flavors
TS · JS · Tailwind · CSS
Live preview
Customize
420px
300px
2px
2
0
1.15×
0.5
90px
24px
import ImageDitherImage from "@/components/repeat-ui/image-dither-image/preview";

<ImageDitherImage />

Installation

  1. Run the command

    Adds the files and installs any packages they need. Works with npm, pnpm, yarn and bun.

    $ npx @hritik-sharmaa/repeat-ui add image-dither-image --variant ts-tailwind
  2. Use it

    The files are in components/repeat-ui/image-dither-image/.

    import ImageDitherImage from "@/components/repeat-ui/image-dither-image/preview";
    
    export default function Page() {
      return <ImageDitherImage />;
    }

Props

PropTypeDefaultDescriptionOptions
srcstringMountain photoImage URL; same-origin or served with CORS headers.-
altstring""Image description for screen readers.-
widthnumber420Width in pixels.-
heightnumber300Height in pixels.-
algorithm"atkinson" | "floyd-steinberg" | "bayer" | "noise" | "threshold""atkinson"How tones become dots: error diffusion (Atkinson, Floyd–Steinberg), an ordered pattern (Bayer, noise) or a plain cut-off.atkinson | floyd-steinberg | bayer | noise | threshold
pixelSizenumber2Size of each dot in pixels; rounded to whole screen pixels so dots stay crisp.-
levelsnumber2Number of tones, from the dark colour to the light one.-
brightnessnumber0Lighten or darken before dithering.-
contrastnumber1.15Contrast before dithering.-
sharpennumber0.5Edge sharpening, so detail survives the dots.-
darkColorstring"#141414"Colour of the darkest dots.-
lightColorstring"#ece8dc"Colour of the lightest dots.-
revealbooleantrueScan the image in from the top when it loads.-
lensSizenumber90Diameter of the hover lens onto the original; 0 turns it off.-
radiusnumber24Corner radius in pixels.-
classNamestring""Extra classes for the root element.-

More image

See all