Translate

Moves an element along the x and y axis.

Classes
Class Properties
translate-x-0 transform: translateX(0%);
translate-x-100 transform: translateX(100%);
-translate-x-100 transform: translateX(-100%);
translate-y-0 transform: translateY(0%);
translate-y-100 transform: translateY(100%);
-translate-y-100 transform: translateY(-100%);
Examples
primeflex
primeflex
primeflex

<div class="card flex flex-wrap align-items-center justify-content-center md:justify-content-between">
    <div class="h-5rem w-5rem shadow-1 bg-blue-100 m-5">
        <img src="../../assets/images/product-placeholder.svg" class="translate-x-100 w-5rem h-5rem" alt="primeflex">
    </div>
    <div class="h-5rem w-5rem shadow-1 bg-blue-100 m-5">
        <img src="../../assets/images/product-placeholder.svg" class="translate-x-0 w-5rem h-5rem" alt="primeflex">
    </div>
    <div class="h-5rem w-5rem shadow-1 bg-blue-100 m-5">
        <img src="../../assets/images/product-placeholder.svg" class="-translate-x-100 w-5rem h-5rem" alt="primeflex">
    </div>
</div>

Responsive

Responsive alternatives are available for customizations based on screen size. Add the responsive breakpoint keyword followed by a semi-colon as a prefix such as md:translate-x-0 to use a responsive class.

  • sm: small screens e.g. phones
  • md: medium screens e.g. tablets
  • lg: large screens e.g. notebooks
  • xl: larger screens e.g monitors
primeflex

<div class="card flex align-items-center justify-content-center">
    <div class="h-10rem w-10rem shadow-1 bg-blue-100">
        <img src="../../assets/images/product-placeholder.svg" class="-translate-x-100 md:translate-x-100 w-10rem h-10rem" alt="primeflex">
    </div>
</div>