This package has been deprecated

Author message:

No longer maintained

sb-x-notification

2.0.1 • Public • Published

x-notification

X-Notification is an HTML5 Custom Element derived from the awesome Codrops demo.

For browsers who don't support custom elements natively, You're gonna need to import a polyfill :(

API

class XNotification extends HTMLElement {
  dismiss()
  static create(message: string, options: Object{type: string, autoremove: boolean})
}

Example Usage

Attributes other than message are optional.

<x-notification message="A Message" autoremove="false" type="notice"></x-notification>
const notification = XNotification.create("A Notification")
setTimeout(function(){
  notification.dismiss()
}, 25e2)

License

This project is licensed under the terms of MIT License. See the License file for more info.

Readme

Keywords

Package Sidebar

Install

npm i sb-x-notification

Weekly Downloads

1

Version

2.0.1

License

MIT

Last publish

Collaborators

  • steelbrain