Skip to content
This repository has been archived by the owner on Dec 31, 2018. It is now read-only.

steelbrain/x-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Codedrops notifications as HTML5 Custom Element

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published