Borders
Border Radius
Utilities for controlling the border radius of an element.
Quick reference
Class | Properties |
---|---|
rounded-none | border-radius: 0px; |
rounded-sm | border-radius: 0.125rem; |
rounded | border-radius: 0.25rem; |
rounded-md | border-radius: 0.375rem; |
rounded-lg | border-radius: 0.5rem; |
rounded-xl | border-radius: 0.75rem; |
rounded-2xl | border-radius: 1rem; |
rounded-3xl | border-radius: 1.5rem; |
rounded-full | border-radius: 9999px; |
rounded-t-none | border-top-left-radius: 0px; border-top-right-radius: 0px; |
rounded-t-sm | border-top-left-radius: 0.125rem; border-top-right-radius: 0.125rem; |
rounded-t | border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; |
rounded-t-md | border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; |
rounded-t-lg | border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; |
rounded-t-xl | border-top-left-radius: 0.75rem; border-top-right-radius: 0.75rem; |
rounded-t-2xl | border-top-left-radius: 1rem; border-top-right-radius: 1rem; |
rounded-t-3xl | border-top-left-radius: 1.5rem; border-top-right-radius: 1.5rem; |
rounded-t-full | border-top-left-radius: 9999px; border-top-right-radius: 9999px; |
rounded-r-none | border-top-right-radius: 0px; border-bottom-right-radius: 0px; |
rounded-r-sm | border-top-right-radius: 0.125rem; border-bottom-right-radius: 0.125rem; |
rounded-r | border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; |
rounded-r-md | border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; |
rounded-r-lg | border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; |
rounded-r-xl | border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; |
rounded-r-2xl | border-top-right-radius: 1rem; border-bottom-right-radius: 1rem; |
rounded-r-3xl | border-top-right-radius: 1.5rem; border-bottom-right-radius: 1.5rem; |
rounded-r-full | border-top-right-radius: 9999px; border-bottom-right-radius: 9999px; |
rounded-b-none | border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; |
rounded-b-sm | border-bottom-right-radius: 0.125rem; border-bottom-left-radius: 0.125rem; |
rounded-b | border-bottom-right-radius: 0.25rem; border-bottom-left-radius: 0.25rem; |
rounded-b-md | border-bottom-right-radius: 0.375rem; border-bottom-left-radius: 0.375rem; |
rounded-b-lg | border-bottom-right-radius: 0.5rem; border-bottom-left-radius: 0.5rem; |
rounded-b-xl | border-bottom-right-radius: 0.75rem; border-bottom-left-radius: 0.75rem; |
rounded-b-2xl | border-bottom-right-radius: 1rem; border-bottom-left-radius: 1rem; |
rounded-b-3xl | border-bottom-right-radius: 1.5rem; border-bottom-left-radius: 1.5rem; |
rounded-b-full | border-bottom-right-radius: 9999px; border-bottom-left-radius: 9999px; |
rounded-l-none | border-top-left-radius: 0px; border-bottom-left-radius: 0px; |
rounded-l-sm | border-top-left-radius: 0.125rem; border-bottom-left-radius: 0.125rem; |
rounded-l | border-top-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem; |
rounded-l-md | border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; |
rounded-l-lg | border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; |
rounded-l-xl | border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; |
rounded-l-2xl | border-top-left-radius: 1rem; border-bottom-left-radius: 1rem; |
rounded-l-3xl | border-top-left-radius: 1.5rem; border-bottom-left-radius: 1.5rem; |
rounded-l-full | border-top-left-radius: 9999px; border-bottom-left-radius: 9999px; |
rounded-tl-none | border-top-left-radius: 0px; |
rounded-tl-sm | border-top-left-radius: 0.125rem; |
rounded-tl | border-top-left-radius: 0.25rem; |
rounded-tl-md | border-top-left-radius: 0.375rem; |
rounded-tl-lg | border-top-left-radius: 0.5rem; |
rounded-tl-xl | border-top-left-radius: 0.75rem; |
rounded-tl-2xl | border-top-left-radius: 1rem; |
rounded-tl-3xl | border-top-left-radius: 1.5rem; |
rounded-tl-full | border-top-left-radius: 9999px; |
rounded-tr-none | border-top-right-radius: 0px; |
rounded-tr-sm | border-top-right-radius: 0.125rem; |
rounded-tr | border-top-right-radius: 0.25rem; |
rounded-tr-md | border-top-right-radius: 0.375rem; |
rounded-tr-lg | border-top-right-radius: 0.5rem; |
rounded-tr-xl | border-top-right-radius: 0.75rem; |
rounded-tr-2xl | border-top-right-radius: 1rem; |
rounded-tr-3xl | border-top-right-radius: 1.5rem; |
rounded-tr-full | border-top-right-radius: 9999px; |
rounded-br-none | border-bottom-right-radius: 0px; |
rounded-br-sm | border-bottom-right-radius: 0.125rem; |
rounded-br | border-bottom-right-radius: 0.25rem; |
rounded-br-md | border-bottom-right-radius: 0.375rem; |
rounded-br-lg | border-bottom-right-radius: 0.5rem; |
rounded-br-xl | border-bottom-right-radius: 0.75rem; |
rounded-br-2xl | border-bottom-right-radius: 1rem; |
rounded-br-3xl | border-bottom-right-radius: 1.5rem; |
rounded-br-full | border-bottom-right-radius: 9999px; |
rounded-bl-none | border-bottom-left-radius: 0px; |
rounded-bl-sm | border-bottom-left-radius: 0.125rem; |
rounded-bl | border-bottom-left-radius: 0.25rem; |
rounded-bl-md | border-bottom-left-radius: 0.375rem; |
rounded-bl-lg | border-bottom-left-radius: 0.5rem; |
rounded-bl-xl | border-bottom-left-radius: 0.75rem; |
rounded-bl-2xl | border-bottom-left-radius: 1rem; |
rounded-bl-3xl | border-bottom-left-radius: 1.5rem; |
rounded-bl-full | border-bottom-left-radius: 9999px; |
Show all classes
Basic usage
Rounded corners
Use utilities like .rounded-sm
, .rounded
, or .rounded-lg
to apply different border radius sizes to an element.
<div class="rounded ..."></div>
<div class="rounded-md ..."></div>
<div class="rounded-lg ..."></div>
<div class="rounded-full ..."></div>
Pill buttons
Use the rounded-full
utility to create pill buttons.
<button class="rounded-full ...">Save Changes</button>
No rounding
Use rounded-none
to remove an existing border radius from an element.
This is most commonly used to remove a border radius that was applied at a smaller breakpoint.
<button class="rounded-none ...">Save Changes</button>
Rounding sides separately
Use rounded-{t|r|b|l}{-size?}
to only round one side of an element.
<div class="rounded-t-lg ..."></div>
<div class="rounded-r-lg ..."></div>
<div class="rounded-b-lg ..."></div>
<div class="rounded-l-lg ..."></div>
Rounding corners separately
Use rounded-{tl|tr|br|bl}{-size?}
to only round one corner an element.
<div class="rounded-tl-lg ..."></div>
<div class="rounded-tr-lg ..."></div>
<div class="rounded-br-lg ..."></div>
<div class="rounded-bl-lg ..."></div>
Applying conditionally
Hover, focus, and other states
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:rounded-lg
to only apply the rounded-lg
utility on hover.
<div class="rounded hover:rounded-lg">
<!-- ... -->
</div>
For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.
Breakpoints and media queries
You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:rounded-lg
to apply the rounded-lg
utility at only medium screen sizes and above.
<div class="rounded md:rounded-lg">
<!-- ... -->
</div>
To learn more, check out the documentation on Responsive Design, Dark Mode and other media query modifiers.
Using custom values
Customizing your theme
By default, Tailwind provides five border radius size utilities. You can change, add, or remove these by editing the theme.borderRadius
section of your Tailwind config.
tailwind.config.js
module.exports = { theme: { borderRadius: { 'none': '0', 'sm': '0.125rem', DEFAULT: '0.25rem', DEFAULT: '4px', 'md': '0.375rem', 'lg': '0.5rem', 'full': '9999px', 'large': '12px', } }}
Learn more about customizing the default theme in the theme customization documentation.
Arbitrary values
If you need to use a one-off border-radius
value that doesn’t make sense to include in your theme, use square brackets to generate a property on the fly using any arbitrary value.
<div class="rounded-[12px]">
<!-- ... -->
</div>
Learn more about arbitrary value support in the arbitrary values documentation.