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

@eequ/notification

v1.0.4

Published

React Notification UI Component

Downloads

30

Readme

Introduction

Display notifications without effort. Errors, warnings, or important information about applications actions. For example, if a file failed to upload an error notification should appear.

Its features:

  • Multiple notifications at once
  • Custom icons and color for each state
  • Change the placement of notifications (any of viewport's corners)
  • They persist during page navigations
  • Control over autoclose (you can even force manual close)
  • Actions inside the notification element
  • Provide any react code as notification content
  • Responsive and custom design
  • They are not part of components, so we don't bother with the state each time
  • useNotification hook that returns elements holder with context accessible issue
  • Update the content of the notification even after what is displayed
  • Animated on appearance/close
  • Just call the notification function, anywhere. No extra code required, ever.

Quick Start

import notification from "notification";

const Example = () => {
  const notify = () => {
    notification.info({
      message: "Information title",
      description: "This is the content of the notification.",
      onClick: () => console.log("Notification Clicked!"),
      duration: 3,
    });
  };

  return (
    <>
      <div>hello {data.name}!</div>
      <button onClick={notify}>Click me!</button>
    </>
  );
};

Usage

Inside components, import the module:

import notification from "notification";

API

notification.info({ message, description, actions, duration });

Parameters

  • message: string for the notification header
  • content: JSX elements rendered inside notification body
  • actions: buttons as actions for notifications

Options

  • onClick: function that will be called on notification click
  • duration = 3: can be used to specify how long the notification stays open. After the duration time elapses, the notification closes automatically. To prevent autoclose, provide duration value as 0.
  • placement = rightBottom: a notification box can appear on any corner of the viewport by providnig values: topRight, bottomRight, bottomLeft or topLeft
  • type: deprecated, as it must be used with-in function call (ex: notification.error({ ... }))

We can use notification.useNotification to get holder with context accessible issue.

import { createContext } from "react";
import notification from "notification";

const Context = createContext({ name: "Default" });

const Example = () => {
  const [api, holder] = notification.useNotification();

  const openNotification = () => {
    api.info({
      message: "Notification",
      content: (
        <Context.Consumer>{({ name }) => `Hello, ${name}!`}</Context.Consumer>
      ),
    });
  };

  return (
    <Context.Provider value={{ name: "Eequ Mentor" }}>
      {holder}

      <button onClick={() => openNotification()}>topLeft</button>
    </Context.Provider>
  );
};

export default Example;