Skip to content

A simple no-dependency JavaScript library for showing toast notifications

License

Notifications You must be signed in to change notification settings

FaisalST32/fs-toast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

toast-fs

A simple javascript library for displaying toast notifications. This library doesn't have any dependencies and can be used with any webpage.

You can view a demo here

CDN Links:

https://cdn.jsdelivr.net/gh/FaisalST32/fs-toast@latest/src/js/toastfs.min.js
https://cdn.jsdelivr.net/gh/FaisalST32/fs-toast@latest/src/css/toastfs.min.css

NPM

npm i fs-toast

https://www.npmjs.com/package/fs-toast

Usage:

  • To use the library you can simply add a reference to the .js file at the end of the body of your html and the .css file in the head of your html page.

  • To display a toast notification, use the following methods.

Methods:

The plugin exposes these methods that you can use:

  • toastfs.success('message') - This will display a success toast with the provided message

  • toastfs.error('message') - This will display an error toast with the provided message

  • toastfs.remove() - This will remove any toast that might be displayed.

Releases

No releases published

Packages

No packages published