jnoty-inline

Snackbar like notification for the web. Build for javascript promises.


Keywords
Snackbar, alerts, notification, bootstrap alerts, growl, javascript, javascript-plugin, toast
License
MIT
Install
bower install jnoty-inline

Documentation

jnoty-inline

Install

$ npm i jnoty-inline

or

$ bower install jnoty-inline --save

Demo

📝 https://visualapps.github.io/jnoty-inline/

Usages

Usage is simple:

jnotyInline.pending({
 message: 'Updating...'
});
jnotyInline.fulfilled({
 message: 'Profile updated successfully.'
});
jnotyInline.rejected({
 message: 'Something went wrong!',
 sticky: true
});

Hide a notification

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

<script type="module">
 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)
</script>

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, Released under the MIT License.
Authored and maintained by rake7h.

GitHub @visualapps · Twitter @rake7h