Implementation Tab
<span class="badge">1</span>
Another example:
<ul class="stack-nav" role="list">
<li>
<a class="repel bt-thin bb-thin" href="#">
<span class="cluster">
<span class="stack-nav__icon animated-icon play" data-animated-icon="chart"></span>
<span class="stack-nav__title">Reports</span>
</span>
<span class="cluster">
<span class="badge badge-solid-negative">17</span>
</span>
</a>
</li>
</ul>
Superscript and subscript
For an inline superscript position, apply badge
to a <sup>
element (because superscript, the badge will be smaller).
Example superscript badge 2
For an inline subscript position, apply badge
to a <sub>
element (because subscript, the badge will be smaller).
Example subscript badge 3
Inline <span class="badge">1</span>
Superscript <sup class="badge">2</sup>
Subscript <sub class="badge">3</sub>
Badge colors:
1
2
345
678
99+
<span class="badge badge-notice">1</span>
<span class="badge badge-negative">2</span>
<span class="badge badge-positive">345</span>
<span class="badge badge-informative">678</span>
<span class="badge badge-primary">99+</span>
Badge colors solid:
1
2
345
678
99+
<span class="badge badge-solid-notice">1</span>
<span class="badge badge-solid-negative">2</span>
<span class="badge badge-solid-positive">345</span>
<span class="badge badge-solid-informative">678</span>
<span class="badge badge-solid-primary">99+</span>
Different sizes
Badges are sized in em
units, so that they grow according to the size of the text they are on. Besides applying badge
to superscript and subscript, badge size can be controlled in other ways.
This text is bigger, and so is its badge 1
<p style="font-size: 36px">This text is bigger, and so is its badge <sup class="badge">1</sup></p>
If you want a badge to be smaller than ABC, like this: ABC – that can be done with text-sm
.
<span class="badge">ABC</span>
<span class="badge t-sm">ABC</span>
See inline text utilities
Over the corners of parent elements
Give the containing element the relative
class, so that the following absolute
positioned badges will be in the correct places.
<button>
<span class="badge badge-top-right badge-warning t-sm">99+</span>
</button>