https://github.com/walteribeiro/simple-notification
Simple Notifications for web aplications
https://github.com/walteribeiro/simple-notification
javascript notifications web web-notifications
Last synced: about 1 year ago
JSON representation
Simple Notifications for web aplications
- Host: GitHub
- URL: https://github.com/walteribeiro/simple-notification
- Owner: walteribeiro
- License: mit
- Created: 2017-12-14T22:05:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-08T10:36:28.000Z (about 6 years ago)
- Last Synced: 2025-05-02T02:39:43.483Z (about 1 year ago)
- Topics: javascript, notifications, web, web-notifications
- Language: JavaScript
- Homepage: https://jsfiddle.net/walter1992/awt5mLk9/
- Size: 615 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Welcome to simple-notification 👋
> Simple Notifications for web aplications
### ✨ [Demo](https://jsfiddle.net/walter1992/awt5mLk9/)
## Install
```sh
yarn add simple-notification
```
## Usage
Available methods
```javascript
simpleNotify.basic("message", "title", options)
simpleNotify.info("message", "title", options)
simpleNotify.danger("message", "title", options)
simpleNotify.success("message", "title", options)
simpleNotify.warning("message", "title", options)
```
Default options
```javascript
var options = {
type: '',
title: '',
content: '',
lifetime: 5000,
sticky: false,
closeTrigger: true,
iconCls: '',
};
```
| Prop | Description |
| --- | --- |
| **`type`** | success, info, warning, danger. |
| **`title`** | The title of notification. |
| **`content`** | The content of notification. |
| **`lifetime`** | The time in milliseconds to destroy the notification. |
| **`sticky`** | If **true** the notification won't be destroyed automatically. |
| **`closeTrigger`** | If **false** the close button won't be displayed. |
| **`iconCls`** | Represent the icon class of FontAwesome. For Example 'envelope', it isn't necessary to give the full name like 'fa fa-envelope'. |
### Dependencies
This library needs the JQuery.
FontAwesome is not required, only if you like using icons.
## Development
To compile run:
```bash
$ gulp default
```
To serve local run:
```bash
$ npm run dev
```
## Author
👤 **Walter Ribeiro**
* Twitter: [@walter19921](https://twitter.com/walter19921)
* Github: [@walteribeiro](https://github.com/walteribeiro)
* LinkedIn: [@walterribeiroti](https://linkedin.com/in/walterribeiroti)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/walteribeiro/simple-notification/issues). You can also take a look at the [contributing guide](https://github.com/walteribeiro/simple-notification/blob/master/CONTRIBUTING.md).
## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2020 [Walter Ribeiro](https://github.com/walteribeiro).
This project is [MIT](https://github.com/walteribeiro/simple-notification/blob/master/LICENSE) licensed.