1.0.3 • Published 2 years ago
ws-toast v1.0.3
🍞 ws-toast
A simple way to create toast components.
Very simple usage
Let us imagine that we have a button that creates a toast when it is clicked.
<button onclick="createToast({ message: 'This is a success message', variant: 'success', position: 'top-right' });">Success</button>
.
Parameters
- message = (string) => The message that will be rendered inside. Default: "This is message info".
- duration = (number) => The time that you will see the toast on screen. Default:
5000
. - variant = (string) => The icon and title that will be rendered. You can choose between
info
,warning
,error
, andsuccess
. Default:info
. - position = (string) => The position of the toast on the screen. You can choose between
top-left
,top-right
,bottom-left
andbottom-right
. Default:bottom-right
.
Authors
Support
For support, email manuel@webschuppen.com.