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

sticker-forge-react

v0.2.0

Published

A peelable WebGL sticker engine with React and Tailwind-friendly DOM snapshots

Readme

sticker-forge-react

React library for turning arbitrary JSX/Tailwind content into a realistic, peelable WebGL sticker.

The React adapter snapshots the cover automatically, then hands the resulting canvas directly to the framework-independent Sticker Forge renderer. Content revealed underneath remains normal, interactive React DOM.

Credits

The concept and WebGL peel implementation are inspired by CatsJuice/sticker-forge, released under the MIT License. See THIRD_PARTY_NOTICES.md for the retained attribution and license text.

Install

pnpm add sticker-forge-react

The package expects React 18 or newer. It is browser-only and intended for client-side React applications such as Vite.

Peel a React component

import { PeelableSticker } from "sticker-forge-react/react";

export function Ticket() {
  return (
    <PeelableSticker
      ariaLabel="ฉีกสติกเกอร์"
      interaction={{
        grabFrom: "left",
        peelToward: "right",
        threshold: 0.72,
      }}
      onPeelComplete={() => console.log("peeled")}
    >
      <div className="border-y-2 border-dashed bg-white p-6">
        เก็บ LV.เชี่ยวชาญ ให้ครบ เพื่อปลดล็อคห้องสอบ
      </div>
    </PeelableSticker>
  );
}

The child may use Tailwind, inline SVG, imported Vite assets, pseudo-elements, and web fonts. The cover is a visual snapshot while peeling, so controls that must remain interactive should be placed in the revealed content instead.

Reveal React content

import { PeelReveal } from "sticker-forge-react/react";

export function ExamRoom({ unlocked, unlock }: Props) {
  return (
    <PeelReveal
      revealed={unlocked}
      onReveal={unlock}
      cover={<LockedExamRoom />}
      stickerProps={{
        snapshotKey: `locked-${locale}-${completedCount}`,
        interaction: {
          grabFrom: "left",
          peelToward: "right",
          threshold: 0.72,
        },
        sound: { enabled: true, volume: 0.65 },
      }}
    >
      <ExamRoomActions />
    </PeelReveal>
  );
}

revealed is controlled by the application. Persist it in the backend or application state; Sticker Forge does not access storage or APIs.

Interaction

  • grabFrom: "left" | "right" | "top" | "bottom" | "any"
  • peelToward: "left" | "right" | "top" | "bottom" | "free"
  • threshold: normalized completion threshold
  • incomplete snap gestures spring back automatically
  • Arrow keys adjust peel progress
  • Enter or Space completes the peel
  • motion: "system" respects prefers-reduced-motion

Sound is disabled by default.

Imperative handle

const sticker = useRef<PeelableStickerHandle>(null);

sticker.current?.reset();
await sticker.current?.recapture();
const state = sticker.current?.getState();

Use snapshotKey to refresh a cover when its content changes. Resize-driven snapshots are handled automatically and deferred until an active gesture ends.

For animated carousels or other transition-heavy screens, delay the initial snapshot/WebGL setup until the transition settles:

<PeelableSticker defer={350} pixelRatio={1}>
  <Ticket />
</PeelableSticker>

Image URLs use the browser cache during snapshots. Set cacheBust only when an asset changes at the same URL and must be downloaded again.

Core API

The renderer remains available without React:

import { createSticker } from "sticker-forge-react/core";

const instance = await createSticker(element, {
  source: { type: "image", src: imageUrl },
});

Call instance.destroy() before permanently removing its target.

Local development

pnpm install
pnpm dev
pnpm typecheck
pnpm test
pnpm build

The Vite/Tailwind playground includes the exam-room peel-to-reveal example.

Release

  1. Update version in package.json.
  2. Add release notes to CHANGELOG.md.
  3. Run pnpm release:check.
  4. Authenticate your npm account and enable security-key/passkey 2FA.
  5. Run pnpm publish.

The package publishes publicly to the npm registry.

Only dist, license files, and third-party notices are included.