Skip to content

aayushmaan-54/TypeScript-Toastify-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript-Toastify

Twitter npm NPM npm

🦚 TypeScript Toastify allows you to add toast notifications to your web app easily.

Light.webm
dark.webm

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 🠮

@aayushmaan54      @aayushmaan54

License

Licensed under MIT