h-12: Tailwind CSS Height class

The h-12 class sets the height of an element to 3rem (48 pixels).


h-12

The h-12 class sets the height of an element to 3rem (48 pixels). This size is commonly used for slightly larger buttons, input fields, or navigation bars.

Code Example

html
<div class="h-12 bg-indigo-500 text-white text-center flex justify-center items-center font-bold rounded-md">Height: 12</div>

Preview

Height: 12

How to Use

Add the h-12 class directly to your HTML element:

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

Responsive Usage

Use Tailwind's responsive prefixes to apply h-12 at specific breakpoints:

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