Alerts
Bootstrap 5 Alerts component
Responsive Alerts built with the latest Bootstrap 5. 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
*
*
UMD autoinits are enabled
by default. This means that you don't need to initialize
the component manually. However if you are using MDBootstrap ES format then you should pass
the required components to the initMDB
method.
Basic examples
Click the buttons to launch the alerts.
<!-- Trigger buttons -->
<button type="button" id="primary" class="btn btn-primary m-1" data-mdb-ripple-init >Primary</button>
<button type="button" id="secondary" class="btn btn-secondary m-1" data-mdb-ripple-init >Secondary</button>
<button type="button" id="success" class="btn btn-success m-1" data-mdb-ripple-init >Success</button>
<button type="button" id="danger" class="btn btn-danger m-1" data-mdb-ripple-init >Danger</button>
<button type="button" id="warning" class="btn btn-warning m-1" data-mdb-ripple-init >Warning</button>
<button type="button" id="info" class="btn btn-info m-1" data-mdb-ripple-init >Info</button>
<button type="button" id="light" class="btn btn-light m-1" data-mdb-ripple-init >Light</button>
<button type="button" id="dark" class="btn btn-dark m-1" data-mdb-ripple-init >Dark</button>
<!-- Alerts -->
<div
data-mdb-alert-init
class="alert fade"
id="alert-primary"
role="alert"
data-mdb-color="primary"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple primary alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-secondary"
role="alert"
data-mdb-color="secondary"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple secondary alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-success"
role="alert"
data-mdb-color="success"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple success alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-danger"
role="alert"
data-mdb-color="danger"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple danger alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-warning"
role="alert"
data-mdb-color="warning"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple warning alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-info"
role="alert"
data-mdb-color="info"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple info alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-light"
role="alert"
data-mdb-color="light"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple light alert with
<a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
data-mdb-alert-init
class="alert fade"
id="alert-dark"
role="alert"
data-mdb-color="dark"
data-mdb-position="top-right"
data-mdb-stacking="true"
data-mdb-width="535px"
data-mdb-width="535px"
data-mdb-append-to-body="true"
data-mdb-hidden="true"
data-mdb-autohide="true"
data-mdb-delay="2000"
>
A simple dark alert with
<a href="#" data-mdb-alert-init class="alert-link">an example link</a>. Give it a click if you like.
</div>
// Initialization for ES Users
import { Alert, initMDB } from 'mdb-ui-kit';
initMDB({Alert});
const triggers = [
'primary',
'secondary',
'success',
'danger',
'warning',
'info',
'light',
'dark',
];
const basicInstances = [
'alert-primary',
'alert-secondary',
'alert-success',
'alert-danger',
'alert-warning',
'alert-info',
'alert-light',
'alert-dark',
];
triggers.forEach((trigger, index) => {
let basicInstance = Alert.getInstance(document.getElementById(basicInstances[index]));
document.getElementById(trigger).addEventListener('click', () => {
basicInstance.show();
});
});
const triggers = [
'primary',
'secondary',
'success',
'danger',
'warning',
'info',
'light',
'dark',
];
const basicInstances = [
'alert-primary',
'alert-secondary',
'alert-success',
'alert-danger',
'alert-warning',
'alert-info',
'alert-light',
'alert-dark',
];
triggers.forEach((trigger, index) => {
let basicInstance = mdb.Alert.getInstance(document.getElementById(basicInstances[index]));
document.getElementById(trigger).addEventListener('click', () => {
basicInstance.show();
});
});
Static examples
Use .alert
class, followed by one of the contextual classes
alert-success
, .alert-info
, .alert-warning
,
.alert-danger
, .alert-primary
, .alert-secondary
,
.alert-light
or .alert-dark
to create an alert.
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="primary">
A simple primary alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="secondary">
A simple secondary alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="success">
A simple success alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="danger">
A simple danger alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="warning">
A simple warning alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="info">
A simple info alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="light">
A simple light alert—check it out!
</div>
<div data-mdb-alert-init class="alert" role="alert" data-mdb-color="dark">
A simple dark alert—check it out!
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Link Color
Use .alert-link
class to create matching colored links inside the alert box.
<div class="alert" role="alert" data-mdb-color="primary" data-mdb-alert-init>
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="secondary" data-mdb-alert-init>
A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="success" data-mdb-alert-init>
A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="danger" data-mdb-alert-init>
A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="warning" data-mdb-alert-init>
A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="info" data-mdb-alert-init>
A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="light" data-mdb-alert-init>
A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert" role="alert" data-mdb-color="dark" data-mdb-alert-init>
A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
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.
<div class="alert" role="alert" data-mdb-color="primary" data-mdb-alert-init>
<i class="fas fa-info-circle me-3"></i>A simple primary alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="secondary" data-mdb-alert-init>
<i class="fas fa-circle me-3"></i>A simple secondary alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="success" data-mdb-alert-init>
<i class="fas fa-check-circle me-3"></i>A simple success alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="danger" data-mdb-alert-init>
<i class="fas fa-times-circle me-3"></i>A simple danger alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="warning" data-mdb-alert-init>
<i class="fas fa-exclamation-triangle me-3"></i>A simple warning alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="info" data-mdb-alert-init>
<i class="fas fa-chevron-circle-right me-3"></i>A simple info alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="light" data-mdb-alert-init>
<i class="fab fa-gratipay me-3"></i>A simple light alert—check it out!
</div>
<div class="alert" role="alert" data-mdb-color="dark" data-mdb-alert-init>
<i class="fas fa-gem me-3"></i>A simple dark alert—check it out!
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Additional Content
Alerts can contain additional elements like headings, paragraphs and dividers.
Well done!
Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
<div class="alert" role="alert" data-mdb-color="success" data-mdb-alert-init>
<h4 class="alert-heading">Well done!</h4>
<p>
Aww yeah, you successfully read this important alert message. This example text is
going to run a bit longer so that you can see how spacing within an alert works with
this kind of content.
</p>
<hr />
<p class="mb-0">
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
</p>
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Dismissing
Using the alert JavaScript plugin, it’s possible to dismiss any alert inline. Here’s how:
- Be sure you’ve loaded the alert plugin, or the compiled Bootstrap JavaScript.
- Add
data-mdb-alert-init
attribute. -
Add a close button and the
.alert-dismissible
class, which adds extra padding to the right of the alert and positions the close button. -
On the close button, add the
data-mdb-dismiss="alert"
attribute, which triggers the JavaScript functionality. Be sure to use thebutton
element with it for proper behavior across all devices. -
To animate alerts when dismissing them, be sure to add the
.fade
and.show classes
.
You can see this in action with a live demo:
<div class="alert alert-dismissible fade show" role="alert" data-mdb-alert-init data-mdb-color="warning">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-mdb-dismiss="alert" aria-label="Close"></button>
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Show
You can manually show alert using show()
method.
<div class="alert fade" id="show-example" data-mdb-hidden="true" role="alert" data-mdb-alert-init data-mdb-color="primary">
Hidden alert!
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Alert.getInstance(document.getElementById('show-example')).show();
mdb.Alert.getInstance(document.getElementById('show-example')).show();
Hide
You can manually hide alert using hide()
method.
<div class="alert fade show mt-3" id="hide-example" role="alert" data-mdb-alert-init data-mdb-color="primary">
Hide me!
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Alert.getInstance(document.getElementById('hide-example')).hide();
mdb.Alert.getInstance(document.getElementById('hide-example')).hide();
Placement
You can set the position of every alert using the
data-mdb-position
attribute.
Select horizontal / vertical alignment
Current position: top-right
<div
class="alert fade mt-3"
id="placement-example"
data-mdb-position="top-right"
data-mdb-hidden="true"
data-mdb-width="25%"
role="alert"
data-mdb-alert-init
data-mdb-color="primary"
>
Show me wherever you want!
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Alert.getInstance(document.getElementById('placement-example')).show();
mdb.Alert.getInstance(document.getElementById('placement-example')).show();
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.
<div
class="alert fade"
id="container-example"
role="alert"
data-mdb-alert-init
data-mdb-container="#parent-container-example"
data-mdb-color="primary"
>
Hello from parent element!
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Alert.getInstance(document.getElementById('container-example')).show();
mdb.Alert.getInstance(document.getElementById('container-example')).show();
Offset
You can set offset of your alert using a data-mdb-offset
tag.
<div
class="alert fade"
id="offset-example"
data-mdb-hidden="true"
data-mdb-offset="100"
role="alert"
data-mdb-alert-init
data-mdb-color="primary"
>
Offset: 100px
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
Alert.getInstance(document.getElementById('offset-example')).show();
mdb.Alert.getInstance(document.getElementById('offset-example')).show();
Stacking
You can turn on stacking your alerts using the
data-mdb-stacking
attribute.
<div class="container text-center">
<button type="button" class="btn btn-primary" id="stacking-trigger-example" data-mdb-ripple-init >
Show notification
</button>
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
let alertCount = 0;
function* colorGenerator(i) {
const colors = ['primary', 'warning', 'info', 'success', 'secondary', 'danger', 'light'];
while (true) {
yield colors[i];
i++;
if (i > colors.length - 1) {
i = 0;
}
}
}
const colorIterator = colorGenerator(0);
document.getElementById('stacking-trigger-example').addEventListener('click', () => {
alertCount++;
color = colorIterator.next().value;
const alert = document.createElement('div');
alert.innerHTML = `
<div class="d-flex justify-content-between">
<p class="mb-0"><strong>${alertCount}.</strong> Stacking alerts</p>
<button type="button" class="btn-close" data-mdb-dismiss="alert" aria-label="Close"></button>
</div>
`;
alert.classList.add('alert', 'fade');
document.body.appendChild(alert);
const alertInstance = new Alert(alert, {
color,
stacking: true,
hidden: true,
width: '450px',
position: 'bottom-right',
autohide: true,
delay: 5000,
});
alertInstance.show();
});
let alertCount = 0;
function* colorGenerator(i) {
const colors = ['primary', 'warning', 'info', 'success', 'secondary', 'danger', 'light'];
while (true) {
yield colors[i];
i++;
if (i > colors.length - 1) {
i = 0;
}
}
}
const colorIterator = colorGenerator(0);
document.getElementById('stacking-trigger-example').addEventListener('click', () => {
alertCount++;
color = colorIterator.next().value;
const alert = document.createElement('div');
alert.innerHTML = `
<div class="d-flex justify-content-between">
<p class="mb-0"><strong>${alertCount}.</strong> Stacking alerts</p>
<button type="button" class="btn-close" data-mdb-dismiss="alert" aria-label="Close"></button>
</div>
`;
alert.classList.add('alert', 'fade');
document.body.appendChild(alert);
const alertInstance = new mdb.Alert(alert, {
color,
stacking: true,
hidden: true,
width: '450px',
position: 'bottom-right',
autohide: true,
delay: 5000,
});
alertInstance.show();
});
Stacking - Container
You can also stack alerts inside the container
<div class="container text-center" id="parent-stacking-container-example">
<button type="button" class="btn btn-primary mb-5" id="stacking-container-trigger-example" data-mdb-ripple-init >
Show notification
</button>
</div>
// Initialization for ES Users
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
let alertCount = 0;
function* colorGenerator(i) {
const colors = ['primary', 'warning', 'info', 'success', 'secondary', 'danger', 'light'];
while (true) {
yield colors[i];
i++;
if (i > colors.length - 1) {
i = 0;
}
}
}
const colorIterator = colorGenerator(0);
document
.getElementById('stacking-container-trigger-example')
.addEventListener('click', () => {
alertCount++;
color = colorIterator.next().value;
const alert = document.createElement('div');
alert.innerHTML = `
<div class="d-flex justify-content-between">
<p class="mb-0"><strong>${alertCount}.</strong> Stacking alerts</p>
<button
type="button"
class="btn-close"
data-mdb-dismiss="alert"
aria-label="Close"
></button>
</div>
`;
alert.classList.add('alert', 'fade');
document.getElementById('parent-stacking-container-example').appendChild(alert);
const alertInstance = new Alert(alert, {
color,
stacking: true,
container: '#parent-stacking-container-example',
hidden: true,
width: '250px',
position: 'top-right',
autohide: true,
delay: 5000,
});
alertInstance.show();
});
let alertCount = 0;
function* colorGenerator(i) {
const colors = ['primary', 'warning', 'info', 'success', 'secondary', 'danger', 'light'];
while (true) {
yield colors[i];
i++;
if (i > colors.length - 1) {
i = 0;
}
}
}
const colorIterator = colorGenerator(0);
document
.getElementById('stacking-container-trigger-example')
.addEventListener('click', () => {
alertCount++;
color = colorIterator.next().value;
const alert = document.createElement('div');
alert.innerHTML = `
<div class="d-flex justify-content-between">
<p class="mb-0"><strong>${alertCount}.</strong> Stacking alerts</p>
<button
type="button"
class="btn-close"
data-mdb-dismiss="alert"
aria-label="Close"
></button>
</div>
`;
alert.classList.add('alert', 'fade');
document.getElementById('parent-stacking-container-example').appendChild(alert);
const alertInstance = new mdb.Alert(alert, {
color,
stacking: true,
container: '#parent-stacking-container-example',
hidden: true,
width: '250px',
position: 'top-right',
autohide: true,
delay: 5000,
});
alertInstance.show();
});
Alerts - API
Import
Importing components depends on how your application works. If you intend to use the MDBootstrap ES
format, you must
first import the component and then initialize it with the initMDB
method. If you are going to use the UMD
format,
just import the mdb-ui-kit
package.
import { Alert, initMDB } from "mdb-ui-kit";
initMDB({ Alert });
import "mdb-ui-kit"
Usage
Via data attributes
Using the Alert component doesn't require any additional JavaScript code - simply add
data-mdb-alert-init
attribute to
.alert
and use other data attributes to set all options.
For ES
format, you must first import and call the initMDB
method.
<div class="alert alert-primary fade show" id="example" data-mdb-alert-init data-mdb-autohide="true" data-mdb-delay="2000" role="alert">
Example
</div>
Dismiss
Dismissal can be achieved with data attributes on a button within the alert as demonstrated below:
<button type="button" class="btn-close" data-mdb-dismiss="alert" aria-label="Close"></button>
or on a button outside the alert using the data-mdb-target
as
demonstrated below:
<button type="button" class="btn-close" data-mdb-dismiss="alert" data-mdb-target="#my-alert" aria-label="Close"></button>
Via JavaScript
const element = document.querySelector('.alert');
new Alert(alert)
const element = document.querySelector('.alert');
new mdb.Alert(alert)
Via jQuery
Note: By default, MDB does not include jQuery and you have to add it to the project on your own.
$(document).ready(() => {
$('.example-class').alert(options);
});
Options
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to
data-mdb-
, as in data-mdb-offset=""
.
Name | Type | Default | Description |
---|---|---|---|
position
|
String | null | null |
Sets the position of the alert. It can include horizontal options: top or
bottom , and vertical options: left , center , or
right . It can also be a combination of any horizontal and vertical
values, for example, top-left
|
delay |
Number | 1000 |
Sets the length of animation delay |
autohide
|
Boolean | false |
Alerts will hide automatically or not |
hidden
|
Boolean | false |
Alerts will be hidden until show() method is invoked. |
width
|
String | null | null |
Sets width of alert |
container
|
String | null | null |
Defines id/class of the parent element |
offset |
Number | 10 |
Defines offset of the element |
stacking
|
Boolean | false |
Enables stacking alerts |
appendToBody
|
Boolean | false |
Appends element to the end of the body |
color
|
String | null | null |
Allows to set the color of an alert - primary | secondary | secondary | danger | warning | info | light | dark |
Methods
Name | Description | Example |
---|---|---|
show |
Manually shows an alert | myAlert.show() |
hide |
Manually hides an alert | myAlert.hide() |
close |
Manually hides an alert (deletes it from DOM) | myAlert.close() |
dispose
|
Removes an mdb.Alert instance |
myAlert.dispose()
|
getInstance
|
Static method which allows you to get the alert instance associated to a DOM element. |
Alert.getInstance(myAlert)
|
getOrCreateInstance
|
Static method which returns an alert instance associated to a DOM element or create a new one in case it wasn't initialized. |
Alert.getOrCreateInstance(myAlert)
|
update |
Updates options of an mdb.Alert instance |
myAlert.update({position: 'top-right'})
|
const alertEl = document.getElementById('show-example');
const alert = new Alert(alertEl);
alert.show();
const alertEl = document.getElementById('show-example');
const alert = new mdb.Alert(alertEl);
alert.show();
Events
Name | Description |
---|---|
close.mdb.alert
|
Fires immediately when the close instance method is called. |
closed.mdb.alert
|
Fired when the alert has been closed and CSS transitions have completed. |
show.mdb.alert |
This event is triggered when a new alert is about to be shown. By using e.preventDefault() you
can implement custom validation.
|
shown.mdb.alert |
This event is triggered after the alert has been shown. |
hide.mdb.alert |
This event is triggered when a new alert is about to be hidden. By using e.preventDefault() you
can implement custom validation.
|
hidden.mdb.alert |
This event is triggered after the alert has been hidden. |
const alert = document.getElementById('example')
alert.addEventListener('close.mdb.alert', () => {
// do something
});
CSS variables
As part of MDB’s evolving CSS variables approach, alerts now uses local CSS variables on
.alert
for enhanced real-time customization. Values for the CSS variables are set
via Sass, so Sass customization is still supported, too.
// .alert
--#{$prefix}alert-bg: transparent;
--#{$prefix}alert-padding-x: #{$alert-padding-x};
--#{$prefix}alert-padding-y: #{$alert-padding-y};
--#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
--#{$prefix}alert-color: inherit;
--#{$prefix}alert-border-color: transparent;
--#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
--#{$prefix}alert-border-radius: #{$alert-border-radius};
--#{$prefix}alert-link-color: inherit;
// .alert-fixed
--#{$prefix}alert-fixed-z-index: #{$zindex-alert};
SCSS variables
$alert-zindex: 1070;
$alert-padding-y: 1.25rem;
$alert-padding-x: 1.5rem;
$alert-margin-bottom: 1rem;
$alert-border-radius: $border-radius-lg;
$alert-link-font-weight: $font-weight-bold;
$alert-border-width: var(--#{$prefix}border-width);
$alert-dismissible-padding-r: $alert-padding-x * 3;
$alert-bg-scale: -80%;
$alert-border-scale: -70%;
$alert-color-scale: 40%;