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

@alisdev/fe-kit-notify

v2.1.0

Published

A high-performance, stacked notification system for React. Supports multiple positions, progress bars, interactive actions, and seamless promise-based toasts.

Readme

@alisdev/fe-kit-notify

A high-performance, stacked notification system for React. Supports multiple positions, progress bars, interactive actions, and seamless promise-based toasts.

Features

  • 📍 6 Positions: Render notifications in top-left, top-center, top-right, bottom-left, bottom-center, or bottom-right.
  • Progress Tracking: Visual progress bar indicating how much time is left before auto-dismissal.
  • ⏸️ Pause on Hover: Automatically pauses the dismissal timer when the user hovers over the notification.
  • 🤝 Promise Support: notify.promise() automatically handles loading, success, and error states for async operations.
  • 🖱️ Interactive Actions: Attach buttons and callbacks directly inside the toast.
  • 🎨 Customizable: Control durations, animations, and max visible counts globally or per-toast.

Installation

pnpm add @alisdev/fe-kit-notify

Global Setup

  1. Configure the default behavior using NotifyKit.setup.
  2. Mount NotifyContainer at the root of your application.
import { NotifyKit, NotifyContainer } from "@alisdev/fe-kit-notify";

// Configure global defaults (Optional)
NotifyKit.setup({
  position: "bottom-right",
  duration: 4000,
  maxVisible: 4,
  pauseOnHover: true,
  animation: {
    in: "slide",
    out: "fade",
    duration: 300
  }
});

function App() {
  return (
    <>
      <Router />
      <NotifyContainer />
    </>
  );
}

Basic Usage

The notify object provides methods for different semantic types:

import { notify } from "@alisdev/fe-kit-notify";

// Simple success
notify.success("Profile updated successfully!");

// Error with description
notify.error("Failed to connect to the database.");

// Informational
notify.info("A new software update is available.");

// Warning
notify.warning("Your storage is almost full.");

// Custom styling
notify.custom("File uploaded", {
  duration: 2000,
  position: "top-center" // Override global position for this specific toast
});

Advanced Features

1. Promise Toasts

Automatically track an asynchronous operation. The toast will show a loading state, then automatically switch to success or error depending on the promise resolution.

import { notify } from "@alisdev/fe-kit-notify";

async function handleSaveData() {
  const saveRequest = api.post("/data", myData);

  await notify.promise(saveRequest, {
    loading: "Saving your changes...",
    success: "Data saved successfully!",
    error: (err) => `Failed to save: ${err.message}`
  });
}

2. Interactive Actions

You can embed an action button directly into the notification.

notify.warning("You have unsaved changes.", {
  duration: 0, // 0 means persistent (will not auto-dismiss)
  dismissible: false, // Hides the 'X' button
  action: {
    label: "Save Now",
    onClick: async () => {
      await saveChanges();
      notify.dismissAll(); // Clear notifications programmatically
    }
  }
});

3. Dismissing Notifications

Notifications auto-dismiss based on duration, but you can control them manually:

// Create a toast and get its unique ID
const toastId = notify.info("Uploading file...", { duration: 0 });

// Later...
notify.dismiss(toastId);

// Or clear the entire screen
NotifyKit.dismissAll();

Configuration Options

NotifyOptions (Per-Toast Config)

Passed as the second argument to any notify.* method.

| Property | Type | Default | Description | | :--- | :--- | :--- | :--- | | duration | number | 3000 | Time in ms before auto-dismiss. Set to 0 to make it persistent. | | position | NotifyPosition | Global config | Overrides the global position. | | dismissible| boolean | true | Whether to show the close 'X' button. | | action | NotifyAction | undefined | { label: string, onClick: () => void } |

NotifyKitConfig (Global Config via setup)

| Property | Type | Default | Description | | :--- | :--- | :--- | :--- | | maxVisible | number | 3 | Maximum number of toasts visible at once. Older ones are queued. | | pauseOnHover| boolean | true | Pauses the progress bar when the mouse enters the toast. | | stack | boolean | true | Whether to stack them visually or overlay them. |