Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

notification

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notification

Notification component for the client (growl-like)

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Notification

Notification component with a clean slate to build off of, style and position them however you like.

js growl component

These don't have to look like growl style notifications, use your trusty friend CSS.

Installation

$ npm install notification-component

Features

  • events for composition
  • structural CSS letting you decide on style
  • transient notifications
  • transient closable notifications
  • sticky (implicitly closable) notifications
  • notification classes (info, warn, error)
  • fluent API

Events

  • close the notification is closed via the X
  • click the notification is clicked

API

notify(msg)

Notify with the given msg and no title. The notification will hide after 4 seconds by default.

notify(title, msg)

Notify with the given msg and title. The notification will hide after 4 seconds by default.

notify.info(title, [msg])

Same as notify()

notify.warn(title, [msg])

Same as notify() with a warn class for styling.

notify.error(title, [msg])

Same as notify() with a error class for styling.

Notification#sticky()

Make the notification sticky, aka it will not close automatically, and it will automatically be .closable().

Notification#show()

Show the notification.

Notification#hide()

Hide the notification.

Notification#closable()

Mark the notification as closable, adding an "X" so the user may explicitly close it.

Notification#effect(name)

One of the following effects, or define your own with class name:

  • slide
  • fade
  • scale

License

MIT

Keywords

FAQs

Package last updated on 16 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc