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

paywall-js

v1.1.0

Published

Simple payment reminder - makes websites fade out when payment is overdue

Readme

Paywall.js 🛡️

Simple payment reminder - makes websites fade out when payment is overdue.

📖 ¿Prefieres leer en español? Ver README en español

Installation

npm install paywall-js

📦 Package: paywall-js on npm

Quick Start

<script src="node_modules/paywall-js/dist/paywall.min.js"></script>
<script>
  new Paywall({
    dueDate: '2025-07-15',
    daysDeadline: 10
  });
</script>

Visual Effects

Paywall offers three different visual effects to remind users about overdue payments:

🎨 Gradient Effect (Default)

Beautiful gradient overlay that intensifies over time.

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10
  // Use default gradient effect
});

🔴 Solid Effect

Solid color overlay that darkens gradually.

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10,
  effect: 'solid',
  color: '#ff0000'
});

🌫️ Fade Effect

Simple opacity reduction of the body (original method).

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10,
  effect: 'fade'
});

Configuration

| Option | Type | Required | Default | Description | |--------|------|-----------|-------------|-------------| | dueDate | String | ✅ Yes | - | Payment due date (YYYY-MM-DD) | | daysDeadline | Number | ❌ No | 60 | Days after which the effect is maximum | | effect | String | ❌ No | 'gradient' | Effect type: 'gradient', 'solid', 'fade' | | color | String | ❌ No | '#ff0000' | Color for solid effect (hex or name) | | gradientFrom | String | ❌ No | '#ff0000' | Initial gradient color | | gradientTo | String | ❌ No | '#000000' | Final gradient color | | enabled | Boolean | ❌ No | true | Enables or disables the effect globally |

How it works

  1. Configure: Define your due date and deadline
  2. Automatic Check: The library checks if the payment is overdue
  3. Visual Effect: Applies the selected effect based on the delay
  4. Gradual Intensification: The effect becomes stronger over time
  5. Maximum Impact: When the deadline is reached, the effect reaches full intensity

Examples

Basic Usage (Default Gradient)

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10
  // Automatically uses default gradient effect with default colors
});

Custom Gradient Colors

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10,
  effect: 'gradient',
  gradientFrom: '#ff6600',
  gradientTo: '#cc0000'
});

Solid Blue Overlay

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10,
  effect: 'solid',
  color: '#0066cc'
});

Simple Fade

new Paywall({
  dueDate: '2025-07-15',
  daysDeadline: 10,
  effect: 'fade'
});

Disable on load (opt-out)

new Paywall({
  dueDate: '2025-07-15',
  enabled: false // library loaded but effect not applied
});

Runtime control

const paywall = new Paywall({ dueDate: '2025-07-15' });

// Temporarily disable
paywall.disable();

// Re-enable and re-apply effect
paywall.enable();

// Update configuration on the fly
paywall.update({ effect: 'solid', color: '#0066cc' });

// Completely remove any effect
paywall.destroy();

Features

  • 🚀 Simple Configuration - Only includes the script and configures
  • 🎨 Multiple Effects - Choose between gradient, solid, or fade
  • Automatic - No manual intervention required
  • 🎯 Customizable - Configure colors, dates, and deadlines
  • 📱 Responsive - Works on all devices
  • 🔒 Lightweight - Minimal size, no dependencies

Use Cases

  • Freelancers: Ensure clients pay on time
  • Agencies: Protect against non-payment
  • Developers: Ensure web project payments
  • Consultants: Maintain payment discipline
  • Service Providers: Automatic payment reminders

Demo Pages

Check out the live demos to see each effect in action:

Browser Compatibility

  • ✅ Chrome (latest version)
  • ✅ Firefox (latest version)
  • ✅ Safari (latest version)
  • ✅ Edge (latest version)
  • ✅ Internet Explorer 11+

Author

Paywall.js was inspired by the original concept of @kleampa and developed with improvements by Alberto Guaman for publication on npm.

License

MIT