<div class="alert"> <strong>Notice:</strong> Take a look at this alert message now. </div> <div class="alert accent"> <strong>Heads up:</strong> This message will be more noticeable than the plain one. </div> <div class="alert okay"> <strong>Success!</strong> Your request has been successfully submitted. </div> <div class="alert warning"> <strong>Warning:</strong> Your subscription will end in 15 days. </div> <div class="alert danger"> <strong>Action required:</strong> Your account is currently suspended. </div>
Alerts are suitable for displaying short messages that needs users' attention. Alert boxes will apply simple background color and padding to make the message block stand out from standard content. Use the optional
.danger classes to add background colors that fit the context of the message.
<div class="alert okay"> <span class="alert-icon"><i class="petalicon petalicon-check-round"></i></span> Your request has been successfully submitted. </div>
To help better convey the context of the message, you can add an icon to your alert message. Simply add a petalicon in front of your text. Wrap them around with
<span class="alert-icon"> to add some margin between the icon and the text.
Never gonna give you up, never gonna let you down
Never gonna run around and desert you
Never gonna make you cry, Never gonna say goodbye
Never gonna tell a lie and hurt you
<div class="alert large warning"> <span class="alert-icon"> <i class="petalicon petalicon-warning"></i> </span> <div class="alert-text"> <h4>Warning</h4> <p>Your subscription will end in 15 days.</p> </div> </div>
If you want to display your alerts more prominently, there is a large variant of the alert that doubles the size of the alert icon (32px), applies color and aligns it to the left. You need the
.alert-icon wrap for the icon, and also the
.alert-text wrap for the text block. Insert any HTML elements you want to include in the area.
<p> paragraph tags are used inside alerts and they happen to be the last child of the block, bottom margin will be removed to prevent inconsistent padding for the entire alert box.