translate, scale, rotate, and origin
Change painted geometry without changing its allocated layout size.
Quick reference
| Syntax | Behavior |
|---|---|
translate-x-N / translate-y-N | Physical axes; four-unit spacing scale, default 0. |
translate-inline-N | Logical inline axis; follows direction. |
-translate-x-N / -translate-y-N / -translate-inline-N | Negative translations. |
translate-x-full / translate-y-full / translate-inline-full | Own measured dimension; negative forms supported. |
scale-N / scale-x-N / scale-y-N | 0–200 percent; default 100. |
rotate-N / -rotate-N | Degrees; -360–360; default 0. |
origin-center / top / bottom / left / right | Pivot, using origin- prefix; default center. |
Example
<View class="w-12 h-12 bg-accent transition-transform origin-left rotate-45" />
Rules and validation
Translation uses the supported spacing grammar; scale/rotation use bounded numeric suffixes. Rotation follows the numeric path, not shortest-angle wrapping. Full-size translation retargets when measured size changes. Transforms do not change layout allocation or minimum accessible touch targets. Hit testing follows presentation. Use transition-transform to animate target changes.