npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@denizeffects/ditherfx

v0.1.0

Published

Images that resolve out of ink dithers. Halftone, bayer, noise and ascii reveal modes for React.

Readme

ditherfx

image reveals for react. a picture starts as pure ink-on-paper dither, holds a beat, then resolves cell by cell into the real thing. halftone, bayer, noise and ascii patterns. canvas 2d, zero dependencies, a real img element underneath the whole time.

install

npm install @denizeffects/ditherfx

quick start

import { DitherReveal } from "@denizeffects/ditherfx";

<DitherReveal src="/photo.jpg" alt="a photo" />

by default the reveal plays when the image scrolls into view.

patterns

<DitherReveal src="/photo.jpg" mode="halftone" />  // ink dots sized by darkness
<DitherReveal src="/photo.jpg" mode="bayer" />     // ordered dither, woven retro grid
<DitherReveal src="/photo.jpg" mode="noise" />     // random grain, film-like
<DitherReveal src="/photo.jpg" mode="ascii" />     // glyphs by luminance

triggers

<DitherReveal src="/a.jpg" trigger="inview" />  // plays when scrolled into view (default)
<DitherReveal src="/a.jpg" trigger="mount" />   // plays immediately
<DitherReveal src="/a.jpg" trigger="hover" />   // re-dithers and resolves on pointer enter
<DitherReveal src="/a.jpg" play={n} />          // bump n to replay imperatively

loop mode

play forward, hold the image, dissolve back to dither, and repeat forever. good for index cards, previews, ambient galleries:

<DitherReveal src="/photo.jpg" loop />

the loop parks itself while offscreen and picks back up when scrolled into view.

still mode

skip the reveal and keep the dither forever. good for decorative art, hero backgrounds, section dividers:

<DitherReveal src="/photo.jpg" still />

props

| prop | type | default | notes | | --- | --- | --- | --- | | src | string | | same origin, or served with cors headers | | alt | string | "" | passed to the real img underneath | | mode | "halftone" \| "bayer" \| "noise" \| "ascii" | "halftone" | | | speed | "calm" \| "normal" \| "quick" | "normal" | | | trigger | "inview" \| "mount" \| "hover" | "inview" | | | play | number | 0 | bump it to replay | | cell | number | per mode | dot size in css px | | hold | number | 0.35 | fraction of the run spent as pure dither | | still | boolean | false | never resolves | | loop | boolean | false | forward, hold, reverse, forever | | ink | string | currentColor | dot color | | paper | string | transparent | ground behind the dots | | className, style | | | applied to the wrapper |

theming

:root {
  --dx-ink: #1b1a17;      /* dot color */
  --dx-paper: transparent; /* ground behind the dots */
}

with a transparent paper the dither sits directly on your page background, which is usually what you want.

how it works

the source image is sampled at cell resolution for luminance, drawn as a one bit dither on a canvas, and the true image is painted back cell by cell in bayer matrix order. when the run finishes the canvas hands off to the plain responsive img element that was underneath all along.

accessibility

the real img with its alt text is present from the first render, so screen readers and search engines never see the animation at all. under prefers-reduced-motion the finished image shows immediately and no canvas is created. cross origin images that cannot be sampled fall back to the plain image, never a broken frame.

license

mit