x
1
2
3
4
5
6
7
8
9
<span class='badge text-bg-danger'>Badge</span><div class='mt-5'> <button type='button' class='btn btn-primary position-relative'> Button <span class='badge position-absolute top-0 start-100 translate-middle text-bg-danger'> +99 </span> </button></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
<% style = pill_button ? 'rounded-pill' : '' %><% inline = inline ? '' : 'position-absolute top-0 start-100 translate-middle' %><span class='badge <%= style %> text-bg-<%= colour %>'><%= text %></span><div class='mt-5'> <button type='button' class='btn btn-primary position-relative'> Button <span class='badge <%= inline %> <%= style %> text-bg-<%= colour %>'> <%= notification %> </span> </button></div>
Interactive playground for experimenting with different alert styles and states.
Param | Description | Input |
---|---|---|
Badge text |
|
|
Badge notification text |
|
|
Default bootstrap theme colours |
|
|
Add pill button class |
|
|
Inline badge |
|
No assets to display.
No assets to display.