BOOTSTRAP TOASTS
Solomon Iniodu
Remote Telesales & Sales Performance Leader | AWS Cloud Practitioner | Data-Driven Business Growth | Cloud Solutions & Cost Optimization Enthusiast | AI-Powered Sales Strategy
Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems. They’re built with flexbox, so they’re easy to align and position.
Overview
Things to know when using the toast plugin:
The toast component is like an alert box that is only shown for a couple of seconds when something happens (i.e. when the user clicks on a button, submits a form, etc.).
Basic Examples
To encourage extensible and predictable toasts, we recommend a header and body. Toast headers use?display: flex, allowing easy alignment of content thanks to our margin and flexbox utilities.
Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your “toasted” content and strongly encourage a dismiss button.
How To Create a Toast
To create a toast, use the?.toast?class, and add a?.toast-header?and a?.toast-body?inside of it
Note:?Toasts are hidden by default. Use the?.show?class if you want to display it. To close it, use a <button> element and add?data-bs-dismiss="toast":.