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

itzbandhan-prompterx

v1.0.7

Published

Modern, lightweight replacement for alert, prompt, and confirm.

Readme

itzbandhan-prompterx 🚀

A lightweight, modern, and fully customizable JavaScript library to replace the native browser alert(), prompt(), and confirm().

itzbandhan-prompterx provides non-blocking, Promise-based dialogs that are visually stunning, accessible, and injection-ready with zero dependencies.

npm version License: MIT


🔗 Live Demo

Check out the library in action here: 👉 Live Demo on GitHub Pages


✨ Features

  • 📦 Zero Dependencies: Pure JavaScript, no bulky frameworks required.
  • 🚦 Non-Blocking: Built on Promises; doesn't freeze the main thread.
  • 🎭 Theme Support: 8+ built-in themes (Success, Dark, Glass, Minimal, etc.).
  • 🎨 Full Customization: Control colors, fonts, borders, and backdrop blurs.
  • 🎹 Keyboard Support: Enter to submit, Esc to cancel.
  • 🔄 Smart Queue: Automatically handles multiple dialogs in sequence.
  • Accessible: ARIA-compliant and focus-trapped for screen readers.

📦 Installation

Install the package via npm:

npm install itzbandhan-prompterx

🚀 Usage

1. Simple Alert

Replaces the native alert().

import { setAlert } from 'itzbandhan-prompterx';

await setAlert("Settings saved successfully!", "success");

2. Modern Prompt

Replaces the native prompt().

import { setPrompt } from 'itzbandhan-prompterx';

const name = await setPrompt("Enter your developer name:", "dark");
if (name) {
    console.log(`Hello, ${name}!`);
}

3. Confirmation (Ask)

Replaces the native confirm().

import { setAsk } from 'itzbandhan-prompterx';

const confirmed = await setAsk("Do you want to delete this file?", "error");
if (confirmed) {
    // Perform delete logic
}

🎨 Theme System

Built-in Presets

Simply pass the theme name as the second argument:

  • success / error / info / warning
  • dark / light
  • glass (Frosted glass effect)
  • minimal (Sharp corners, high contrast)
  • modern (Soft shadows, rounded)

Custom Styling

Pass a configuration object for total control:

setPrompt("Custom Action", {
  backgroundColor: "#111",
  textColor: "#00ff00",
  buttonColor: "#222",
  buttonTextColor: "#00ff00",
  borderRadius: "12px",
  fontFamily: "monospace",
  backdrop: "blur(10px)"
});

🛠 API Reference

setAlert(message, options)

| Parameter | Type | Description | | --- | --- | --- | | message | String | The text content of the alert. | | options | String | Object |

setPrompt(message, options)

| Parameter | Type | Description | | --- | --- | --- | | message | String | The label for the input field. | | options | String | Object | | Returns | Promise | Resolves to String (input) or null (cancelled). |

setAsk(message, options)

| Parameter | Type | Description | | --- | --- | --- | | message | String | The question to be confirmed. | | options | String | Object | | Returns | Promise | Resolves to true (OK) or false (Cancel). |


🧠 Technical Details

The Queue Manager

If your application triggers multiple dialogs at once, PrompterX manages a global queue. Dialogs will display one-by-one in the order they were called to ensure a smooth user experience.

setAlert("First Message");
setAlert("Second Message"); // This waits until the first is closed.

📄 License

Distributed under the MIT License. See LICENSE for more information.


Developed by Itzbandhan.