flex-row: Tailwind CSS Flex class

The flex-row class arranges flex items in a horizontal row, with items aligned from left to right by default.


flex-row

The flex-row class arranges flex items in a horizontal row, with items aligned from left to right by default.

Example Code

html
<div class="flex flex-row justify-center items-center p-5 text-white font-bold bg-blue-100 rounded-t-md">
<div class="bg-blue-500 p-4 m-2 rounded">Item 1</div>
<div class="bg-blue-500 p-4 m-2 rounded">Item 2</div>
<div class="bg-blue-500 p-4 m-2 rounded">Item 3</div>
</div>

Preview

Item 1
Item 2
Item 3

How to Use

Add the flex-row class directly to your HTML element:

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

Responsive Usage

Use Tailwind's responsive prefixes to apply flex-row at specific breakpoints:

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