Transforms move, resize or rotate elements without affecting the layout around them.
| Utility | Example |
|---|---|
| scale | scale-90, scale-110, scale-x-150 |
| rotate | rotate-45, -rotate-6, rotate-180 |
| translate | translate-x-4, -translate-y-1, translate-x-full |
| skew | skew-x-6, -skew-y-3 |
| origin | origin-center, origin-top-left |
In Tailwind v4 you no longer need a separate transform class.
With hover and transition
<img class="transition duration-300 hover:scale-110">
3D (v4)
perspective-normal on the parent and rotate-y-12 on the child give a 3D tilt.
Card zoom pattern
Put the image in a box with overflow-hidden, add group to the card and group-hover:scale-110 to the image.
Example
Example — Hover transforms
HTML
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<div class="p-10 flex flex-wrap gap-10 items-center">
<div class="size-20 bg-sky-500 rounded-lg transition hover:scale-125"></div>
<div class="size-20 bg-rose-500 rounded-lg transition hover:rotate-45"></div>
<div class="size-20 bg-amber-500 rounded-lg transition hover:-translate-y-4"></div>
<div class="size-20 bg-emerald-500 rounded-lg transition hover:skew-x-12"></div>
<a href="#" class="group block w-56 rounded-xl overflow-hidden shadow">
<div class="overflow-hidden">
<img src="https://picsum.photos/id/1080/400/250" class="w-full h-32 object-cover transition duration-500 group-hover:scale-110" alt="Food">
</div>
<p class="p-3 font-semibold">Hover to zoom</p>
</a>
</div>