|
@@ -9,7 +9,7 @@ description: Alert messages for user notifications.
|
|
|
|
|
|
Depending on the information you need to convey, you can use one of the following types of alert messages - **success**, **info**, **warning** or **danger**. Using the right type of alert modal will help draw users' attention to the message and prompt them to take action.
|
|
Depending on the information you need to convey, you can use one of the following types of alert messages - **success**, **info**, **warning** or **danger**. Using the right type of alert modal will help draw users' attention to the message and prompt them to take action.
|
|
|
|
|
|
-```html example vertical height="420px"
|
|
|
|
|
|
+```html example vertical background="surface" columns={2} centered separated
|
|
<div class="alert alert-success" role="alert">
|
|
<div class="alert alert-success" role="alert">
|
|
<h4 class="alert-title">Wow! Everything worked!</h4>
|
|
<h4 class="alert-title">Wow! Everything worked!</h4>
|
|
<div class="text-secondary">Your account has been saved!</div>
|
|
<div class="text-secondary">Your account has been saved!</div>
|
|
@@ -39,7 +39,7 @@ Depending on the information you need to convey, you can use one of the followin
|
|
|
|
|
|
Add a link to your alert message to redirect users to the details they need to complete or additional information they should read.
|
|
Add a link to your alert message to redirect users to the details they need to complete or additional information they should read.
|
|
|
|
|
|
-```html example vertical height="7rem"
|
|
|
|
|
|
+```html example vertical background="surface" columns={2} centered
|
|
<div class="alert alert-danger m-0">
|
|
<div class="alert alert-danger m-0">
|
|
This is a danger alert — <a href="#" class="alert-link">check it out</a>!
|
|
This is a danger alert — <a href="#" class="alert-link">check it out</a>!
|
|
</div>
|
|
</div>
|
|
@@ -49,7 +49,7 @@ Add a link to your alert message to redirect users to the details they need to c
|
|
|
|
|
|
Add the `x` close button to make an alert modal dismissible. Thanks to that, your alert modal will disappear only once the user closes it.
|
|
Add the `x` close button to make an alert modal dismissible. Thanks to that, your alert modal will disappear only once the user closes it.
|
|
|
|
|
|
-```html example height="420px"
|
|
|
|
|
|
+```html example vertical background="surface" columns={2} centered separated
|
|
<div class="alert alert-success alert-dismissible" role="alert">
|
|
<div class="alert alert-success alert-dismissible" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
@@ -137,7 +137,24 @@ Add the `x` close button to make an alert modal dismissible. Thanks to that, you
|
|
|
|
|
|
Add an icon to your alert modal to make it more user-friendly and help users easily identify the message.
|
|
Add an icon to your alert modal to make it more user-friendly and help users easily identify the message.
|
|
|
|
|
|
-```html example height="420px"
|
|
|
|
|
|
+```html
|
|
|
|
+<div class="alert alert-success" role="alert">
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <div>
|
|
|
|
+ <!-- SVG icon from http://tabler.io/icons/icon/check -->
|
|
|
|
+ <svg>...</svg>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <h4 class="alert-title">Wow! Everything worked!</h4>
|
|
|
|
+ <div class="text-secondary">Your account has been saved!</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+To see how the icon affects the alert modal, look at the example below.
|
|
|
|
+
|
|
|
|
+```html example vertical background="surface" columns={2} centered separated
|
|
<div class="alert alert-success" role="alert">
|
|
<div class="alert alert-success" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
@@ -201,66 +218,17 @@ Add an icon to your alert modal to make it more user-friendly and help users eas
|
|
</div>
|
|
</div>
|
|
```
|
|
```
|
|
|
|
|
|
-```html
|
|
|
|
-<div class="alert alert-success" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/check -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <h4 class="alert-title">Wow! Everything worked!</h4>
|
|
|
|
- <div class="text-secondary">Your account has been saved!</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
-<div class="alert alert-info" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/info-circle -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <h4 class="alert-title">Did you know?</h4>
|
|
|
|
- <div class="text-secondary">Here is something that you might like to know.</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
-<div class="alert alert-warning" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/alert-triangle -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <h4 class="alert-title">Uh oh, something went wrong</h4>
|
|
|
|
- <div class="text-secondary">Sorry! There was a problem with your request.</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
-<div class="alert alert-danger" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/alert-circle -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <h4 class="alert-title">I'm so sorry…</h4>
|
|
|
|
- <div class="text-secondary">Your account has been deleted and can't be restored.</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
-```
|
|
|
|
|
|
+
|
|
|
|
|
|
## Alert with avatar
|
|
## Alert with avatar
|
|
|
|
|
|
Add an avatar to your alert modal to make it more personalized.
|
|
Add an avatar to your alert modal to make it more personalized.
|
|
|
|
|
|
-```html example height="420px"
|
|
|
|
|
|
+```html example vertical background="surface" columns={2} centered separated
|
|
<div class="alert alert-success" role="alert">
|
|
<div class="alert alert-success" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
- <span class="avatar float-start me-3"></span>
|
|
|
|
|
|
+ <span class="avatar me-3" style="background-image: url(/static/samples/avatars/039m.jpg)"></span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
@@ -270,7 +238,7 @@ Add an avatar to your alert modal to make it more personalized.
|
|
<div class="alert alert-info" role="alert">
|
|
<div class="alert alert-info" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
- <span class="avatar float-start me-3">JL</span>
|
|
|
|
|
|
+ <span class="avatar me-3">JL</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
@@ -280,7 +248,7 @@ Add an avatar to your alert modal to make it more personalized.
|
|
<div class="alert alert-warning" role="alert">
|
|
<div class="alert alert-warning" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
- <span class="avatar float-start me-3"></span>
|
|
|
|
|
|
+ <span class="avatar me-3" style="background-image: url(/static/samples/avatars/035f.jpg)"></span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
@@ -290,7 +258,7 @@ Add an avatar to your alert modal to make it more personalized.
|
|
<div class="alert alert-danger" role="alert">
|
|
<div class="alert alert-danger" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
- <span class="avatar float-start me-3"></span>
|
|
|
|
|
|
+ <span class="avatar me-3" style="background-image: url(/static/samples/avatars/056f.jpg)"></span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
|
@@ -303,7 +271,7 @@ Add an avatar to your alert modal to make it more personalized.
|
|
|
|
|
|
Add primary and secondary buttons to your alert modals if you want users to take a particular action based on the information included in the modal message.
|
|
Add primary and secondary buttons to your alert modals if you want users to take a particular action based on the information included in the modal message.
|
|
|
|
|
|
-```html example height="500px" scrollable
|
|
|
|
|
|
+```html example vertical background="surface" columns={2} centered separated
|
|
<div class="alert alert-success alert-dismissible" role="alert">
|
|
<div class="alert alert-success alert-dismissible" role="alert">
|
|
<h3 class="mb-1">Some Title</h3>
|
|
<h3 class="mb-1">Some Title</h3>
|
|
<p>Lorem ipsum Minim ad pariatur eiusmod ea ut nulla aliqua est quis id dolore minim voluptate.</p>
|
|
<p>Lorem ipsum Minim ad pariatur eiusmod ea ut nulla aliqua est quis id dolore minim voluptate.</p>
|
|
@@ -346,7 +314,15 @@ Add primary and secondary buttons to your alert modals if you want users to take
|
|
|
|
|
|
If you want your alert to be really eye-catching, you can add a class `alert-important`.
|
|
If you want your alert to be really eye-catching, you can add a class `alert-important`.
|
|
|
|
|
|
-```html example vertical height="210px"
|
|
|
|
|
|
+```html
|
|
|
|
+<div class="alert alert-important alert-success alert-dismissible" role="alert">
|
|
|
|
+ ...
|
|
|
|
+</div>
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Look at the example below to see how the important alert affects the alert modal.
|
|
|
|
+
|
|
|
|
+```html example vertical background="surface" columns={2} centered separated
|
|
<div class="alert alert-important alert-success alert-dismissible" role="alert">
|
|
<div class="alert alert-important alert-success alert-dismissible" role="alert">
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div>
|
|
@@ -356,8 +332,7 @@ If you want your alert to be really eye-catching, you can add a class `alert-imp
|
|
</svg>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <h4 class="alert-title">Wow! Everything worked!</h4>
|
|
|
|
- <div class="text-secondary">Your account has been saved!</div>
|
|
|
|
|
|
+ Wow! Everything worked!
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="close"></a>
|
|
<a class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="close"></a>
|
|
@@ -378,54 +353,3 @@ If you want your alert to be really eye-catching, you can add a class `alert-imp
|
|
</div>
|
|
</div>
|
|
```
|
|
```
|
|
|
|
|
|
-```html
|
|
|
|
-<div class="alert alert-important alert-success alert-dismissible" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/check -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- Your account has been saved!
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <a class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="close"></a>
|
|
|
|
-</div>
|
|
|
|
-<div class="alert alert-important alert-info alert-dismissible" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/info-circle -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- Here is something that you might like to know.
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <a class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="close"></a>
|
|
|
|
-</div>
|
|
|
|
-<div class="alert alert-important alert-warning alert-dismissible" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/alert-triangle -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- Sorry! There was a problem with your request.
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <a class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="close"></a>
|
|
|
|
-</div>
|
|
|
|
-<div class="alert alert-important alert-danger alert-dismissible" role="alert">
|
|
|
|
- <div class="d-flex">
|
|
|
|
- <div>
|
|
|
|
- <!-- SVG icon from http://tabler.io/icons/icon/alert-circle -->
|
|
|
|
- <svg>...</svg>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- Your account has been deleted and can't be restored.
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <a class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="close"></a>
|
|
|
|
-</div>
|
|
|
|
-```
|
|
|
|
-
|
|
|