Alerts

Vue Bootstrap 5 Alerts component

Responsive Alerts built with the latest Bootstrap 5 and Vue 3. Alerts provide contextual feedback messages for typical user actions with a handful of responsible and flexible alert boxes.

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Note: Read the API tab to find all available options and advanced customization


Basic examples

Click the buttons to launch the alerts.


Static examples



Icons

Use Font Awesome Icons to create alerts with icons. Depending on your icons and content, you may want to add more utilities or custom styles.


Additional Content


Dismissing

Using the Vue alert component, it’s possible to dismiss any alert inline. Here’s how:

  • Add a dismiss property, which adds close button and extra padding to the right of the alert which positions the close button.
  • Click on the close button to dismiss the alert.

You can see this in action with a live demo:


Show

You can manually show alert using show() method on the alert component ref.


Hide

You can manually hide alert using hide() method on alert component ref.


Placement

You can set the position of every alert using the position property.

Select horizontal / vertical alignment

Current position: top-right

Container

You can display an alert anywhere. Just put it in your target element and fill the data-mdb-container attribute with id or class of parent.


Offset

You can set offset of your alert using a offset> property.


Stacking

You can turn on stacking your alerts using the stacking property.


Stacking - Container

You can also stack alerts inside the container