rounded-sm: Tailwind CSS Border Radius class

The rounded-sm class in Tailwind CSS applies a small border-radius (0.125rem or 2px) to all four corners of an element.


rounded-sm

The rounded-sm class in Tailwind CSS applies a small border-radius (0.125rem or 2px) to all four corners of an element. It gives elements slightly rounded corners—subtle, but enough to soften hard edges without being too prominent.

Syntax

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

Example Code

html
<button class="bg-indigo-600 text-white px-4 py-2 rounded-sm">
Small Rounded Button
</button>

Preview

This adds just a touch of roundness to the button, making it look slightly smoother than a sharp-cornered box.

How to Use

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

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

Responsive Usage

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

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