rounded: Tailwind CSS Border Radius class

The rounded class in Tailwind CSS applies a default border-radius of 0.25rem (4px) to all corners of an element.


rounded

The rounded class in Tailwind CSS applies a default border-radius of 0.25rem (4px) to all corners of an element. It's commonly used to slightly soften the edges of buttons, cards, images, and other UI components.

Syntax

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

Example Code

html
<div class="flex flex-col justify-center items-center gap-2 p-3 rounded-t-md bg-blue-50">
<p class="text-gray-600 font-bold"> Rounded Corners</p>
<div class="rounded bg-blue-500 p-4 w-32 text-white font-semibold">
rounded
</div>
</div>

Preview

Rounded Corners

rounded

This will apply the same medium-level rounding to all four corners.

Use rounded when you want a subtle, consistent corner rounding that gives your components a cleaner and more polished feel without being too dramatic.

How to Use

Add the rounded class directly to your HTML element:

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

Responsive Usage

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

html
<div class="sm:rounded md:rounded lg:rounded">
Responsive element
</div>
  • sm:rounded — applies from 640px and up
  • md:rounded — applies from 768px and up
  • lg:rounded — 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