Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
Bootstrap 4 Alert
Bootstrap 4 provides an easy way to create predefined alert messages. Alerts are created with the
.alert class, followed by one of the eight contextual classes
.alert-link utility to quickly provide matching colored links within any alert.
Bootstrap 4 Alert with Close Button
Bootstrap 4 Alerts are available with an optional close button. Add
.alert-dismissible class to parent div and
.close class and
data-dismiss="alert" attribute to the button element. Additional content like headings, paragraphs and divider can be added to the alerts.
Thank you for contacting us. We have successfully received your email and someone from the customer service team will get back to as soon as possible.
Unlike other Propeller components, Alert is independent of Bootstrap 4 HTML structure.
In Material Design language, alert is known as Snackbar and Toast.
To specify the position of the alert component, use data-positionX (x-axis positioning with
center as values.) and data-positionY (y-axis positioning with
bottom as values.) attributes. To customize the visibility time of alert on screen, use data-duration attribute with a numeric value. To animate the alerts use data-effect attribute (with
fadeInDown values). To add message in the alert, use data-message attribute.
Propeller Alert with Action
This type of Alert comes with an action which is to be performed on the alert message. Along with Propeller Alert HTML, use additional attributes - data-action (with
false value) and data-action-text (with user defined value) to add an action to the alert.
Propeller Alerts with Basic Notification Types
These are simple Propeller Alerts with an additioinal attribute - data-type with predefined eight values -
alert-dark to create alerts with notification types.
The Propeller CSS classes apply various predefined visual enhancements to the Alert. The table lists the available classes and their effects.
||Defines the position of Alert horizontally.||left, right, center|
||Defines the position of Alert vertically.||top, bottom|
||Defines the type of Data in the alert box.||alert-info, alert-warning, alert-success, alert-error, alert-primary, alert-secondary, alert-light, alert-dark|
||Defines the type of animation while showing the alert.||fadeInUp, fadeInDown|
||Required when your alert demands user to perform some action.||true, false|
||Defines the action that needs to be performed.||Close, Refresh, Ok, etc.|
||Customizes the visibility time of alert on the screen.||Numeric value|
||Defines the message that will be displayed in the alert.||Text|
Call the jQuery plugin to initialize the Alert while fetching the data dynamically.
Bootstrap 4 Methods
See here for more documentation on this.
||Makes an alert listen for click events on descendant elements which have the
||Closes an alert by removing it from the DOM. If the
||Destroys an element’s alert.|
Bootstrap 4 Events
Bootstrap 4's alert plugin exposes a few events for hooking into alert functionality. See here for more documentation on this.
||This event fires immediately when the
||This event is fired when the alert has been closed (will wait for CSS transitions to complete).|