Open In App

How to implement the Order Utility in Tailwind CSS ?

Tailwind CSS Order utility class is used to control the visual order of flex or grid items. It allows you to rearrange elements without modifying the underlying HTML structure, enhancing flexibility in the layout design.

Syntax

<div class="flex">
<div class="order-2">Second</div>
<div class="order-1">First</div>
</div>

Here, the order-[number] Class sets the order of the elements within the flex or grid container. The lower the number, the earlier it appears.

Key Features

Article Tags :