Borders
Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.
Additive
Add borders to custom elements:
<span class="border"></span><span class="border-top"></span><span class="border-end"></span><span class="border-bottom"></span><span class="border-start"></span>
Subtractive
Or remove borders:
<span class="border-0"></span><span class="border-top-0"></span><span class="border-end-0"></span><span class="border-bottom-0"></span><span class="border-start-0"></span>
Color
Change the border color using utilities built on our theme colors.
<span class="border border-primary"></span><span class="border border-secondary"></span><span class="border border-success"></span><span class="border border-danger"></span><span class="border border-warning"></span><span class="border border-info"></span><span class="border border-light"></span><span class="border border-dark"></span><span class="border border-white"></span>
Opacity
Use .border-opacity-{value}
utilities.
This is default success border
This is 75% opacity success border
This is 50% opacity success border
This is 25% opacity success border
This is 10% opacity success border
<div class="border border-success p-2 mb-2">This is default success border</div><div class="border border-success p-2 mb-2 border-opacity-75">This is 75% opacity success border</div><div class="border border-success p-2 mb-2 border-opacity-50">This is 50% opacity success border</div><div class="border border-success p-2 mb-2 border-opacity-25">This is 25% opacity success border</div><div class="border border-success p-2 border-opacity-10">This is 10% opacity success border</div>
Width
Use .border-{value}
utilities for aditional sizes.
<span class="border border-1"></span><span class="border border-2"></span><span class="border border-3"></span><span class="border border-4"></span><span class="border border-5"></span>
Radius
Add classes to an element to easily round its corners.
<span class="bg-primary-soft rounded"></span><span class="bg-primary-soft rounded-top"></span><span class="bg-primary-soft rounded-end"></span><span class="bg-primary-soft rounded-bottom"></span><span class="bg-primary-soft rounded-start"></span><span class="bg-primary-soft rounded-circle"></span><span class="bg-primary-soft rounded-pill"></span>
Sizes
Use the .rounded-{value}
classes for larger or smaller rounded corners. Sizes range from 0
to 5
, and can be configured by modifying the utilities API.
<span class="bg-primary-soft rounded-0"></span><span class="bg-primary-soft rounded-1"></span><span class="bg-primary-soft rounded-2"></span><span class="bg-primary-soft rounded-3"></span><span class="bg-primary-soft rounded-4"></span><span class="bg-primary-soft rounded-5"></span>