1.0.4 ⢠Published 1 year ago
typescript-toastify v1.0.4
TypeScript-Toastify
š¦ TypeScript Toastify allows you to add toast notifications to your web app easily.
Installation
> npm i typescript-toastify
Features
- Easy to set up
- Super easy to customize
- Has
onClose
function, which runs function you define when toast closes - Can remove a toast programmatically
- Update toast in between
- Pause toast when the window loses focus š
- pause toast on toast hover
- Fancy progress bar to display the remaining time
- Dark mode š
- set custom position
- set toast closing time
- can use diffrent type of toast like info, error, warning
- And much more !
The gist
import Toast from 'typescript-toastify';
const toast = new Toast({
position: 'top-right',
toastMsg: 'Hello, world!',
autoCloseTime: 3000,
onClose: () => {
alert('TS Toast š');
},
canClose: true,
showProgress: true,
pauseOnHover: true,
pauseOnFocusLoss: true,
type: 'info',
theme: 'dark',
});
Demo
A demo is worth a thousand words
Documentation
Check the documentation to get you started!
Reach me at š ®
License
Licensed under MIT