notti
Don't make me think - Dead simple user notification.
Why should you use notti?
- Tiny size: 2.2kb
- No external CSS dependency
- No jQuery dependency
- Fully customizable
Install
Npm: npm install notti
CDN: https://unpkg.com/notti@0.0.7
The Gist:
; ; ;
API
/** * @name notti * type Function * @description Show an notification * @param {String || Object } The message or customizable Object */ ; // or const customizable = message: 'Hi folks' style: backgroundColor: '#333' color: '#fff' top: '10px' right: '10px' ;
Customizable params
/** * @param * @param * @param * @param * @param * @param * @param **/ const config = // required message: 'Hi Folks' || '<p>Hi <span class="username">Folks</span></p>' // just true if your message contains HTML Element isHTML: false //default //optional style: {} //default //optional autoHide: true //default //optional hideOnClick: true //default //optional delay: 2000 //default //optional {console}