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

ripppl

v0.1.3

Published

Ripple displacement using WebGL over the DOM

Downloads

41

Readme

Installation

npm install ripppl

Usage

import { attachRipple } from "ripppl";

const handle = attachRipple("#my-button", {
  scope: "#card",
  amplitude: 3,
  shimmer: "oklch(0.72 0.19 45)",
});

handle.update({ speed: 400 });
handle.trigger({ x: 0.5, y: 0.5 });
handle.destroy();

attachRipple takes a trigger (CSS selector, element, or list of elements) and optional options. Clicks on the trigger capture the surrounding DOM and run the ripple. Use scope to clip the effect to a container; omit scope for a full-viewport ripple.

The returned handle exposes:

| Method | Purpose | |--------|---------| | update(partial) | Merge new tuning values (see parameters below). | | trigger({ x?, y?, fromElement? }) | Start a ripple at normalized coordinates 0–1 inside the scope, or centered on fromElement. | | invalidateCapture() | Mark the frozen DOM snapshot stale (for example after layout or content changes). The next trigger will capture again unless you prefetch first. | | prefetchCapture() | Start a background capture while the DOM is in a known-good state. Use when you know you will call trigger soon so capture work overlaps with transitions, loaders, or countdowns instead of blocking the first frame of the ripple. | | destroy() | Remove listeners, overlay, and WebGL resources. |

Export RIPPPL_CAPTURE_IGNORE_ATTR: the attribute name (data-ripppl-overlay) placed on the WebGL overlay and on any element that must be omitted from the snapshot. Apply it to temporary UI that should not appear in the captured texture while prefetchCapture runs.

Types: RippleOptions, RippleTuning, RippleHandle are exported from the package.

Parameters

Options passed to attachRipple or update (all optional except where noted):

| Option | Type | Default | Description | |--------|------|---------|-------------| | scope | string | HTMLElement | document.body | Element whose box clips the ripple and capture. | | amplitude | number | 3 | Displacement strength of the wave. | | frequency | number | 0.018 | Spatial frequency of the ripple rings. | | speed | number | 300 | How fast the wave propagates. | | damping | number | 0.025 | Ring falloff behind the wave front. | | decay | number | 1.2 | How quickly the effect fades over time. | | duration | number (ms) | 3500 | Max duration of the animation. | | chromatic | boolean | false | Chromatic aberration on the displaced image. | | chromaticIntensity | number | 0.4 | Strength when chromatic is true. | | shimmer | string | false | false | OKLCH color string for the shimmer pass, or false to disable. | | shimmerWidth | number | 1 | Width of the shimmer band. | | shimmerDuration | number (ms) | 2600 | Shimmer timing relative to the ripple. | | shimmerGlowColor | string | — | Optional OKLCH override for glow highlights (uses shimmer color when omitted). |

Contributing

Issues and pull requests are welcome in GitHub Issues.

Clone the repo, install dependencies, and run the demo or build the library:

git clone https://github.com/Arman-Luthra/ripppl.git
cd ripppl
npm install
npm run dev
npm run build

Please keep changes focused and match existing style. For larger changes, open an issue first so the direction is agreed.

License

MIT