PNotify

4-alpha

Beautiful dependency free notifications.

PNotify on GitHub Bug Report/Feature Request

About PNotify


PNotify is a JavaScript notification library, developed by SciActive.

PNotify provides desktop notifications based on the Web Notifications spec. If desktop notifications are not available or not allowed, PNotify will fall back to displaying the notice as a regular, in-browser notice.

Mobile Ready
PNotify works on your phone and tablet. You can swipe notices away to dismiss them.
Unobtrusive
PNotify can provide non-blocking notices that allow the user to click elements underneath the notice.
Completely Open
PNotify is distributed under the permissive Apache License, Version 2.0.

Simple Demos These demos only use core PNotify features.


Choose the Styling
PNotify supports multiple styling methods and icon sets.
PNotify Core


How to style like Growl.

Module Demos


Desktop Module Notifications that display even when the web page is not visible.
Implements the Web Notifications spec.

The first time you click one of these buttons, you will be asked to grant permission for this site to show notices. Then you can click them again to see the desktop notification.

If your browser doesn't support Web Notifications, or you deny permission to show them, you will only see regular in-browser notices. You can check here.


Buttons Module Sticker and a closer buttons.
Since the Buttons module provides buttons by default, many of the demos on this page include the buttons.
NonBlock Module (Deprecated, Replaced with NonBlock.js) Click through to things underneath the notice.
Mobile Module Notices on mobile phones and tablets.
Since the Mobile module provides support by default, most of the demos on this page work on mobile.
Animate Module Fluid CSS animations using Animate.css.
Some good looking examples:
Or build your own:
Effect in
Effect out
Attention seekers:
Confirm Module Confirmation dialogs and prompts.

Callbacks Module Manipulate the notice during its lifecycle.
History Module Redisplay old notices and limit number of notices.
Reference Module A reference for when you are coding your own module.
Compat Module A backward compatibility module to run PNotify 3 code with PNotify 4.
Check out the Compat demos in IIFE and UMD.

Stacks Position, order, and group notices.


Examples of Custom Stacks

Top Left. Moves down, then right. Pushes to stack top.
Bottom Left. Moves right, then up. Pushes to stack top.
Bottom Right. Moves up, then left. Pushes to stack bottom.
Top Center. Moves down. Pushes to stack bottom.
Really Different Stacks
Modal stack, centered. Moves up. Pushes to stack top.
Modal stack. Moves down, then right. Pushes to stack top.
Top bar style. (Like Old Microsoft Notification Bars.) Moves down, then right. Pushes to stack top.

You also need this CSS:
[ui-pnotify].ui-pnotify.stack-bar-top {
  width: 100%;
}

Bottom bar style. (Like New Microsoft Notification Bars.) Moves up, then right. Pushes to stack bottom.

You also need this CSS:
[ui-pnotify].ui-pnotify.stack-bar-bottom {
  width: 70%;
}

Tooltip
Stack Contexts
By default, a stack will place its notices underneath the body node. You can also specify a context for your notices to be placed in.

Modal:

Stack Context


I'm the stack context where notices will be placed. I'm position: relative, so the notices will be positioned relative to me. My overflow is set to auto, so the notices won't show beyond my borders.

Happy face

Customization and Tools


Timer
Current Timer:
Consuming the Alert Function
This isn't really a feature of PNotify, but it's cool.
  1. Repeat step 1.

Comments