Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
Basic example
Alerts don’t have default classes, only base and modifier classes.
A default gray alert doesn’t make too much sense, so you’re required to specify a type via contextual class.
Choose from success, info, warning, or danger.
AsciiDoc Code
[alert,success] .Well done! -- You successfully read this important alert message. --
Example 1. Alert with success contextual state class
Well done!
You successfully read this important alert message.
AsciiDoc Code
[alert,info] .Heads up! -- This alert needs your attention, but it's not super important. --
Example 2. Alert with info contextual state class
Heads up!
This alert needs your attention, but it’s not super important.
AsciiDoc Code
[alert,warning] .Warning! -- Better check yourself, you're not looking too good. --
Example 3. Alert with warning contextual state class
Warning!
Better check yourself, you’re not looking too good.
AsciiDoc Code
[alert,danger] .Oh snap! -- Change a few things up and try submitting again. --
Example 4. Alert with danger contextual state class
Oh snap!
Change a few things up and try submitting again.
Dismissable alerts
Build on any alert by setting an optional dismiss
option (close button).
AsciiDoc Code
[alert,warning,true] .Warning! -- Better check yourself, you're not looking too good. --
Example 5. Alert with contextual state class
Warning!
Better check yourself, you’re not looking too good.