Skip to content

Order

Utilities for controlling the order of flex and grid items.

ClassProperties
order-firstorder: -9999;
order-lastorder: 9999;
order-noneorder: 0;
order-1order: 1;
order-2order: 2;
order-3order: 3;
order-4order: 4;
order-5order: 5;
order-6order: 6;
order-7order: 7;
order-8order: 8;
order-9order: 9;
order-10order: 10;
order-11order: 11;
order-12order: 12;

Usage

Use order-{order} to render flex and grid items in a different order than they appear in the DOM.

html
<div class="flex justify-between">
  <div class="order-last">
    <!-- ... -->
  </div>
</div>
<div class="flex justify-between">
  <div class="order-last">
    <!-- ... -->
  </div>
</div>

Responsive

To apply an order utility only at a specific breakpoint, add a {screen}: prefix to the existing class name. For example, adding the class md:order-last to an element would apply the order-last utility at medium screen sizes and above.

html
<div class="flex">
  <div class="order-first md:order-last">
    <!-- ... -->
  </div>
</div>
<div class="flex">
  <div class="order-first md:order-last">
    <!-- ... -->
  </div>
</div>

For more information about Gridi responsive design features, check out the Responsive Design documentation.

Released under the MIT License.