An elegant and simple notification for javascript, with no dependencies
- Simple CSS-animated customizable toast pop-ups for any design
- No dependencies and
< 1kb
code - Toasts appear and disappear by specifying optional timeout
Simple-toaster is primarily ES6 module. See it in action:
npm i simple-toaster
import simpleToaster from "simple-toaster"
simpleToaster('success', 'Hello Toaster!')
Parameters:
simpleToaster(
'error', // Toaster style type. Pre-defined: error, warning or success
'message', // Message
false // Timeout in ms (default: 5000)
)
Import the style
@import ~simple-toaster/src/simple-toaster // or '~simple-toaster/dist/simple-toaster.min.css'