Border Radius
Utilities for controlling the border radius of an element.
Contents
Use the border radius utilities to easily round an element corners.
Class | Properties |
---|---|
.rounded | border-radius: 0.1875rem; |
.rounded-0 | border-radius: 0; |
.rounded-1 | border-radius: 0.125rem; |
.rounded-2 | border-radius: 0.25rem; |
.rounded-3 | border-radius: 0.5rem; |
.rounded-4 | border-radius: 0.75rem; |
.rounded-5 | border-radius: 1rem; |
.rounded-circle | border-radius: 50%; |
.rounded-pill | border-radius: 50rem; |
.rounded-top | border-top-left-radius: 0.1875rem; border-top-right-radius: 0.1875rem; |
.rounded-top-0 | border-top-left-radius: 0; border-top-right-radius: 0; |
.rounded-top-1 | border-top-left-radius: 0.125rem; border-top-right-radius: 0.125rem; |
.rounded-top-2 | border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; |
.rounded-top-3 | border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; |
.rounded-top-4 | border-top-left-radius: 0.75rem; border-top-right-radius: 0.75rem; |
.rounded-top-5 | border-top-left-radius: 1rem; border-top-right-radius: 1rem; |
.rounded-end | border-top-right-radius: 0.1875rem; border-bottom-right-radius: 0.1875rem; |
.rounded-end-0 | border-top-right-radius: 0; border-bottom-right-radius: 0; |
.rounded-end-1 | border-top-right-radius: 0.125rem; border-bottom-right-radius: 0.125rem; |
.rounded-end-2 | border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; |
.rounded-end-3 | border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; |
.rounded-end-4 | border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; |
.rounded-end-5 | border-top-right-radius: 1rem; border-bottom-right-radius: 1rem; |
.rounded-bottom | border-bottom-right-radius: 0.1875rem; border-bottom-left-radius: 0.1875rem; |
.rounded-bottom-0 | border-bottom-right-radius: 0; border-bottom-left-radius: 0; |
.rounded-bottom-1 | border-bottom-right-radius: 0.125rem; border-bottom-left-radius: 0.125rem; |
.rounded-bottom-2 | border-bottom-right-radius: 0.25rem; border-bottom-left-radius: 0.25rem; |
.rounded-bottom-3 | border-bottom-right-radius: 0.5rem; border-bottom-left-radius: 0.5rem; |
.rounded-bottom-4 | border-bottom-right-radius: 0.75rem; border-bottom-left-radius: 0.75rem; |
.rounded-bottom-5 | border-bottom-right-radius: 1rem; border-bottom-left-radius: 1rem; |
.rounded-start | border-bottom-left-radius: 0.1875rem; border-top-left-radius: 0.1875rem; |
.rounded-start-0 | border-bottom-left-radius: 0; border-top-left-radius: 0; |
.rounded-start-1 | border-bottom-left-radius: 0.125rem; border-top-left-radius: 0.125rem; |
.rounded-start-2 | border-bottom-left-radius: 0.25rem; border-top-left-radius: 0.25rem; |
.rounded-start-3 | border-bottom-left-radius: 0.5rem; border-top-left-radius: 0.5rem; |
.rounded-start-4 | border-bottom-left-radius: 0.75rem; border-top-left-radius: 0.75rem; |
.rounded-start-5 | border-bottom-left-radius: 1rem; border-top-left-radius: 1rem; |
Basic usage
Rounded corners
Use utilities like .rounded-3
, .rounded
, or .rounded-circle
to apply different border radius sizes to an element.
rounded
rounded-3
rounded-5
rounded-circle
<div class="rounded ..."></div>
<div class="rounded-3 ..."></div>
<div class="rounded-5 ..."></div>
<div class="rounded-circle ..."></div>
Pill buttons
Use the rounded-pill
utility to create pill buttons.
<button class="rounded-pill ...">Save Changes</button>
No rounding
Use rounded-0
to remove an existing border radius from an element.
<button class="rounded-0 ...">Save Changes</button>
Rounding sides separately
Use rounded-{top|end|bottom|start}{-size?}
to only round one side of an element. Sizes range from 0
to 5
by default.
rounded-top-3
rounded-end-3
rounded-bottom-3
rounded-start-3
<div class="rounded-top-3 ..."></div>
<div class="rounded-end-3 ..."></div>
<div class="rounded-bottom-3 ..."></div>
<div class="rounded-start-3 ..."></div>