Alert¶
Added in version 12.0.0.
Renders an alert box (also known as callout) in the HTML.
Props¶
All props are optional.
typestring.Possible values:
info(default),success,warning,danger.
titlestring.messagestring. The alert message.iconstring. A CSS icon class, for exampleti ti-info-circle.If not set, the icon is automatically determined from the alert type.
importantbool. Whentrue, the alert is visually highlighted.Default:
false.
link_textstring. Alert link, either internal or external.link_urlstring. Text for the link. If not defined will display thelink_textlink_blankbool. If true link target will be_blank,_selfotherwiseDefault:
true.
Blocks¶
title¶
Completely overrides the title, including the wrapping <h4> element.
content¶
Completely overrides the message area.
<twig:Alert:Danger>
<twig:block name="title">
<h2 class="alert-title">
Custom title block
</h2>
</twig:block>
<div>
My alert content
</div>
</twig:Alert:Danger>
Variants¶
Pre-typed variant components are available as shortcuts:
<twig:Alert:Success>Success alert</twig:Alert:Success>
<twig:Alert:Info>Info alert</twig:Alert:Info>
<twig:Alert:Warning>Warning alert</twig:Alert:Warning>
<twig:Alert:Danger>Danger alert</twig:Alert:Danger>
<twig:Alert>Main alert</twig:Alert>
<twig:Alert type="danger">Main alert with type danger</twig:Alert>
