https://github.com/rake7h/jnoty-inline
vanilla-javascript. Snackbar like notification for the web. Build for javascript promises.
https://github.com/rake7h/jnoty-inline
javascript javascript-plugin snackbar toast vanilla-javascript
Last synced: 15 days ago
JSON representation
vanilla-javascript. Snackbar like notification for the web. Build for javascript promises.
- Host: GitHub
- URL: https://github.com/rake7h/jnoty-inline
- Owner: rake7h
- License: mit
- Created: 2019-08-18T16:15:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T07:49:33.000Z (over 5 years ago)
- Last Synced: 2026-02-11T06:43:00.615Z (25 days ago)
- Topics: javascript, javascript-plugin, snackbar, toast, vanilla-javascript
- Language: JavaScript
- Homepage:
- Size: 1.25 MB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Install
```bash
$ npm i jnoty-inline
```
or
```bash
$ bower install jnoty-inline --save
```
## Demo
📝 **https://rake7h.github.io/jnoty-inline/**
## Usages
Usage is simple:
```javascript
jnotyInline.pending({
message: 'Updating...'
});
```
```javascript
jnotyInline.fulfilled({
message: 'Profile updated successfully.'
});
```
```javascript
jnotyInline.rejected({
message: 'Something went wrong!',
sticky: true
});
```
Hide a notification
```javascript
jnotyInline.hide();
```
## Options
| ARGUMENT | DESCRIPTION |
| ---------------------- | ----------------------------------------------------------------------------------------- |
| message | Give a message to notification|
| timeout | Set a custom delay (in milliseconds) to hide notification |
| sticky |Disable timeout and make it sticky|
| kind |Set a kind of notification|
| position |Set the custom position of the notification |
**Kinds** : pending, fulfilled, rejected
**position** : Work in progress. Default: bottom-right
**Warning:** _In future versions some commands may change_
## Example
```javascript
import * as module from './jnoty-inline-min.js';
// open a notification
let notification = module.jnotyInline.pending({message:'Updating...'});
// hide after 10000ms
setTimeout(()=>{
notification.hide();
},10000)
```
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Author
**jnoty-inline** © [rake7h](https://github.com/rake7h), Released under the [MIT](./LICENSE) License.
Authored and maintained by rake7h.
> GitHub [@rake7h](https://github.com/rake7h) · Twitter [@rake7h](https://twitter.com/rake7h)