Tailwind: Display content in Reverse order

Display list items in reverse order using tailwind. This can be used to show the contents of a list in reverse. So the last item in the list is shown in the first position of the list.

Reverse Display items using Tailwind

Reversing the contents of the list can be achieved using the flex-col-reverse class name

If we need a border for seperating the list the we can use classes: divide-y-4  divide-y-reverse

Here is the example tailwind code for displaying items of a list in reverse order

<div class="flex flex-col-reverse divide-y divide-y-reverse">
  <div>01</div>
  <div>02</div>
  <div>03</div>
</div>

Tailwind reverse list – Try demo

So this is how easily we can display items of list in reverse using the tailwind css.

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *