Awesome
notifit 2
notifIt version 2 (https://github.com/naoxink/notifIt)
Why notifit 2?
- No dependencies
- Simple
- Quick setup
- Customizable
- Size less than 4kb
Note:
notif_prompt
andnotif_confirm
are not included yet.
How do I use it?
It's quite simple, you only have to include the .js
and .css
files in your HTML.
<link rel="stylesheet" href="notifit.min.css">
and
<script src="notifit.min.js"></script>
or via npm
npm i notifit2
var myNotification = notif({
'type': 'success',
'msg': 'Hello world! This is notifit 2!'
})
Available options
Key | Value type | Required | Options | Description |
---|---|---|---|---|
type | string | No | success, error, info, warning | Notification type (color) |
msg | string | No | Message you want to display | |
position | string | No | top-right , top-center , top-left , bottom-right , bottom-center , bottom-left | Position in the document (default: top-right ) |
opacity | number | No | Notification opacity | |
zindex | number | No | Personal z-index | |
callback | function | No | Function that is executed when notification get dismissed | |
clickable | boolean | No | true, false | Allows to click the notification without dismiss it |
Feedback
Do not hesitate to leave your feedback here
Contributions
All contributions are welcome :)