Alert
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
Default
Use @Html.LLG().Alert()
method to create a simple alert.
A simple primary alert—check it out!
@Html.LLG().Alert().Text("A simple primary alert—check it out!")
Change Color
Use .Color(BootstrapColor color)
method to set color
A simple secondary alert—check it out!
A simple success alert—check it out!
A simple danger alert—check it out!
A simple warning alert—check it out!
A simple info alert—check it out!
A simple light alert—check it out!
A simple dark alert—check it out!
@Html.LLG().Alert("A simple secondary alert—check it out!").Color(BootstrapColor.Secondary)
@Html.LLG().Alert("A simple success alert—check it out!").Color(BootstrapColor.Success)
@Html.LLG().Alert("A simple danger alert—check it out!").Color(BootstrapColor.Danger)
@Html.LLG().Alert("A simple warning alert—check it out!").Color(BootstrapColor.Warning)
@Html.LLG().Alert("A simple info alert—check it out!").Color(BootstrapColor.Info)
@Html.LLG().Alert("A simple light alert—check it out!").Color(BootstrapColor.Light)
@Html.LLG().Alert("A simple dark alert—check it out!").Color(BootstrapColor.Dark)
Dismissible
use .Dismissible(bool dismissible)
method to set dismissible. Default value is false
A simple primary alert—check it out!
You should check in on some of those fields below.
@Html.LLG().Alert().Text("Dismissible set to false.").Dismissible(false)
@Html.LLG().Alert().Text("Dismissible set to true").Color(BootstrapColor.Warning).Dismissible(true)
Additional Content
use .TextTemplate(Func[dynamic, HelperResult] template)
method to set custom html content
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.
@Html.LLG().Alert().TextTemplate(<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>)