VOOZH about

URL: https://www.geeksforgeeks.org/css/tailwind-css-translate/

⇱ Tailwind CSS Translate - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Tailwind CSS Translate

Last Updated : 23 Jul, 2025

This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. This class is used to translating elements with transform. In CSS, we have done that by using the CSS translate() function.

Translate Classes:

  • translate-x-{amount}: This class holds the length of translation corresponding to the x-axis.
  • -translate-x-{amount}: This parameter holds the length of translation corresponding to the reverse x-axis.
  • translate-y-{amount}: This parameter holds the length of translation corresponding to the y-axis.
  • -translate-y-{amount}: This parameter holds the length of translation corresponding to the reverse y-axis.

Note: Amount totally depends on your choices, you can set it as full as percentage, or directly put the rem value.

Syntax:

<element class="translate-{axis}-{amount}">...</element>

Example:

Output:

👁 Image
tailwind CSS translate class
Comment