![]() |
VOOZH | about |
Bootstrap 5 Toasts are a type of alert box that is used to show a message or an update to the user. For example, submitting a form, clicking a button, or maybe a push notification inside the website. The alert box type of toast is shown for a couple of seconds.
The show() method is used to show the toast when it is triggered.
toast.show()This method returns to the caller before the toast has actually been shown.
Example 1: The example below demonstrates the usage of the Toasts show() Method using buttons.
Output:
Example 2: The example below demonstrates the usage of the Bootstrap 5 Toasts show() Method using buttons and with the stacking of the toasts.
Output:
Reference: https://getbootstrap.com/docs/5.0/components/toasts/#show