Bootstrap Alert Shortcodes

Shortcodes to generate alert messages with styles, headings and Markdown.

Alert

Alert Parameters

style

PositionNameTypeRequiredDefaultSince
#0stylestring-primary-

primary, secondary, success, danger, warning, info, light and dark.

Alert Styles

 1{{< bs/alert primary >}}
 2A simple primary alert—check it out!
 3{{< /bs/alert >}}
 4
 5{{< bs/alert secondary >}}
 6A simple secondary alert—check it out!
 7{{< /bs/alert >}}
 8
 9{{< bs/alert success >}}
10A simple success alert—check it out!
11{{< /bs/alert >}}
12
13{{< bs/alert danger >}}
14A simple danger alert—check it out!
15{{< /bs/alert >}}
16
17{{< bs/alert warning >}}
18A simple warning alert—check it out!
19{{< /bs/alert >}}
20
21{{< bs/alert info >}}
22A simple info alert—check it out!
23{{< /bs/alert >}}
24
25{{< bs/alert light >}}
26A simple light alert—check it out!
27{{< /bs/alert >}}
28
29{{< bs/alert dark >}}
30A simple dark alert—check it out!
31{{< /bs/alert >}}

Alert With Markdown

1{{% bs/alert style=primary %}}
2A simple *primary alert* with Markdown—**check it out**!
3{{% /bs/alert %}}

The bs/alert-link allows inserting a styled link to an alert message.

text

PositionNameTypeRequiredDefaultSince
#0textstring--

The text.

url

PositionNameTypeRequiredDefaultSince
#1urlstring--

The URL.

1{{< bs/alert >}}
2A simple primary alert with {{< bs/alert-link "an example link" "#alert-link" >}}. Give it a click if you like.
3{{< /bs/alert >}}
4
5{{< bs/alert warning >}}
6A simple warning alert with {{< bs/alert-link "an example link" "#alert-link" >}}. Give it a click if you like.
7{{< /bs/alert >}}

Alert Heading

The bs/alert-heading shortcode is used to add a heading for alert messages.

Alert Heading Parameters

title

PositionNameTypeRequiredDefaultSince
#0titlestring--

The title.

Alert Heading Examples

1{{% bs/alert success %}}
2{{< bs/alert-heading "Well done!" >}}
3Aww 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.
4{{% /bs/alert %}}