rounded-tr: Tailwind CSS Border Radius class

The rounded-tr class in Tailwind CSS adds a default border radius to the top-right corner of an element.


rounded-tr

The rounded-tr class in Tailwind CSS adds a default border radius to the top-right corner of an element. It's useful when you want only that specific corner to have a smooth, rounded edge.

Syntax

html
<div class="rounded-tr">...</div>

Example Code

html
<div class="bg-teal-600 text-white font-semibold p-4 rounded-tr border">
Only the top-right corner is rounded
</div>

Preview

Only the top-right corner is rounded

Use rounded-tr when you need to soften just the top-right corner of a box or container. It pairs well with other rounded-* classes for creating unique card shapes, panels, or UI sections.

How to Use

Add the rounded-tr class directly to your HTML element:

html
<div class="rounded-tr">
<!-- Your content here -->
</div>

Responsive Usage

Use Tailwind's responsive prefixes to apply rounded-tr at specific breakpoints:

html
<div class="sm:rounded-tr md:rounded-tr lg:rounded-tr">
Responsive element
</div>
  • sm:rounded-tr — applies from 640px and up
  • md:rounded-tr — applies from 768px and up
  • lg:rounded-tr — applies from 1024px and up

Customization

You can extend or override this utility in your tailwind.config.js. See the Tailwind CSS documentation for details on customizing your theme.

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates