Browse documentation

Reference / Transforms

Transform origin

Choose the pivot for scale, rotation, and skew. Keyword origins cover the center, edges, and corners.

Working example

The left edge of the label stays attached to the rule. Switch to origin-right to move the pivot to the opposite edge.

HTML
<div class="border-l-2 border-black py-3">
  <span class="inline-block origin-left -rotate-6 bg-neutral-100 px-4 py-2">Hinged proof</span>
</div>

Class reference

ClassCSS declarations
origin-centertransform-origin: center;
origin-lefttransform-origin: left;
origin-bottom-righttransform-origin: bottom right;
origin-top-lefttransform-origin: top left;
origin-[20%_80%]transform-origin: 20% 80%;
View full generated CSS
Compiled CSS
.origin-\[20\%_80\%\] {
  transform-origin: 20% 80%;
}
.origin-bottom-right {
  transform-origin: bottom right;
}
.origin-center {
  transform-origin: center;
}
.origin-left {
  transform-origin: left;
}
.origin-top-left {
  transform-origin: top left;
}