Overview
Underline is a set of grouped Bootstrap5 components to include a modern stylised underline for text or labels.
Basic Example
This underline comes in 3 parts:
- The wrapper
- The label
- The line
<span class="d-inline-block position-relative ms-2">
<span class="d-inline-block mb-2 fs-2tx fw-bolder">
Sample Text
</span>
<span class="d-inline-block position-absolute h-8px bottom-0 end-0 start-0 bg-success translate rounded"></span>
</span>
Sizes
Modify the
h-8px
CSS class within the Line element to adjust the underline's thickness.
<span class="d-inline-block position-relative ms-2">
<span class="d-inline-block mb-2 fs-2tx fw-bolder">
Sample Text
</span>
<span class="d-inline-block position-absolute h-3px bottom-0 end-0 start-0 bg-success translate rounded"></span>
</span>
Colors
Modify the
.bg-success
CSS class within the Line element to change the line's color.
Primary
Secondary
Success
Warning
Danger
Info
<span class="d-inline-block position-relative">
<span class="d-inline-block mb-2 fs-2x fw-bolder text-dark">
Sample Text
</span>
<span class="d-inline-block position-absolute h-8px bottom-0 end-0 start-0 bg-primary translate rounded"></span>
</span>