Advertisement

Google Ad Slot: content-top

Bootstrap 5 Toast

~1 min read · Bootstrap
On this page

In Bootstrap 5, toasts are lightweight, customizable alert messages designed for unobtrusive notifications. They are typically used for short, non-blocking messages, like "Saved successfully" or "New message received."

Basic Toast :

A basic toast includes the following structure:

Example
Try it yourself

Toast Triggers:

Toasts can be triggered by buttons or other events.

Example
Try it yourself

Automatic and Manual Dismissal:

  • By default, toasts dismiss themselves automatically after a delay (autohide is true).
  • You can configure the delay using the data-bs-delay attribute or in JavaScript.
Notification
This toast will disappear after 3 seconds!
Notification
This toast will disappear after 3 seconds!
Example
Notification
This toast will disappear after 3 seconds!
Notification
This toast will disappear after 3 seconds!
Try it yourself