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

notice.js

v0.5.0

Published

A beautiful and modern, yet fully customizable notification library

Readme

Notice.js

npm version npm downloads License: MIT GitHub issues GitHub stars

A beautiful and modern, yet fully customizable notification library.

🎮 Try It Live

  • Interactive Demo - Comprehensive demo with all features (open examples/demo.html in your browser)
  • Online Demo - Live demo on GitHub Pages (if enabled)

Features

  • 🎨 Beautiful and customizable design
  • 📱 Responsive and mobile-friendly
  • ⚡ Lightweight and fast
  • 🎭 Support for CSS animations
  • ⏱️ Auto-close with configurable timeout
  • 📊 Progress bar indicator
  • 🎯 Multiple positions (topLeft, topRight, bottomLeft, bottomRight, etc.)
  • 🔔 Multiple notification types (success, error, warning, info)
  • 🌐 RTL (Right-to-Left) language support

Installation

NPM

npm install notice.js --save

Direct Download

Download from GitHub releases or latest snapshot

Quick Start

1. Include Stylesheet

<link rel="stylesheet" href="node_modules/notice.js/dist/noticejs.css" />
<!-- or -->
<link rel="stylesheet" href="dist/noticejs.css" />

2. Include Script

<script src="node_modules/notice.js/dist/notice.js"></script>
<!-- or -->
<script src="dist/notice.js"></script>

3. Basic Usage

new NoticeJs({
    text: 'Hello, World!',
    position: 'topRight',
}).show();

Examples

Basic Notification

new NoticeJs({
    text: 'Operation completed successfully!',
    position: 'topRight',
    type: 'success'
}).show();

With Timeout

The timeout option controls how long (in milliseconds) the notification stays visible. Set to false to disable auto-close.

// Auto-close after 5 seconds
new NoticeJs({
    text: 'This will disappear in 5 seconds',
    position: 'topRight',
    timeout: 5000  // 5 seconds
}).show();

// Disable auto-close
new NoticeJs({
    text: 'This stays until manually closed',
    position: 'topRight',
    timeout: false
}).show();

With Title

new NoticeJs({
    title: 'Success',
    text: 'Your changes have been saved!',
    position: 'topRight',
    type: 'success'
}).show();

With Animation

Notice.js supports CSS animations. Works great with Animate.css:

new NoticeJs({
    text: 'Notification with animation',
    position: 'topLeft',
    animation: {
        open: 'animated bounceInRight',
        close: 'animated bounceOutLeft'
    }
}).show();

With Progress Bar

new NoticeJs({
    text: 'Loading...',
    position: 'topRight',
    progressBar: true,
    timeout: 3000  // Progress bar shows countdown
}).show();

Different Types

// Success
new NoticeJs({
    text: 'Operation successful!',
    type: 'success',
    position: 'topRight'
}).show();

// Error
new NoticeJs({
    text: 'Something went wrong!',
    type: 'error',
    position: 'topRight'
}).show();

// Warning
new NoticeJs({
    text: 'Please check your input',
    type: 'warning',
    position: 'topRight'
}).show();

// Info
new NoticeJs({
    text: 'New update available',
    type: 'info',
    position: 'topRight'
}).show();

Callbacks

new NoticeJs({
    text: 'Notification with callbacks',
    position: 'topRight',
    callbacks: {
        onShow: function() {
            console.log('Notification shown!');
        },
        onClose: function() {
            console.log('Notification closed!');
        }
    }
}).show();

Configuration Options

| Option | Type | Default | Description | |-------|------|---------|-------------| | text | string | '' | Notification message text | | title | string | '' | Notification title (optional) | | type | string | 'success' | Notification type: success, error, warning, info | | position | string | 'topRight' | Position: topLeft, topRight, bottomLeft, bottomRight | | timeout | number/boolean | 30 | Auto-close timeout in milliseconds. Set to false to disable. | | progressBar | boolean | true | Show progress bar countdown | | closeWith | array | ['button'] | Ways to close: ['button'], ['click'], or both ['button', 'click'] | | animation | object/null | null | Animation classes: { open: 'class', close: 'class' } | | newestOnTop | boolean | false | Show newest notifications on top | | rtl | boolean | false | Right-to-Left language support |

Positions

  • topLeft
  • topRight
  • bottomLeft
  • bottomRight

Browser Support

Notice.js works in all modern browsers:

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)
  • IE11+ (with polyfills)

Contributing

Contributions are welcome! Please read our Contributing Guide first.

License

MIT License - see LICENSE file for details.

Testing & Examples

You can test notice.js locally by opening examples/demo.html in your browser:

# After building the project
npm run build

# Open examples/demo.html in your browser
open examples/demo.html  # macOS
# or just double-click examples/demo.html

The demo includes interactive examples of all features including:

  • All notification types (success, error, warning, info)
  • Different positions
  • Timeout controls
  • Progress bars
  • Animations
  • Callbacks
  • And more!

Repository