Rotation
Rotation utilities set the individual rotate property, not transform. That
means they compose with translate and scale instead of overwriting them.
Classes
Section titled “Classes”| Class | rotate |
|---|---|
rotate-minus-270 |
-270deg |
rotate-minus-180 |
-180deg |
rotate-minus-90 |
-90deg |
rotate-0 |
0deg |
rotate-plus-90 |
90deg |
rotate-plus-180 |
180deg |
rotate-plus-270 |
270deg |
rotate-plus-360 |
360deg |
<div class="rotate-plus-90">90°</div><div class="rotate-minus-90">-90°</div><div class="rotate-plus-180">180°</div><div class="rotate-0">0°</div>Knob and origin
Section titled “Knob and origin”Set --rotate for a one-off angle, and transform-origin when the pivot should
not be the center:
<div class="rotate-plus-90" style="--rotate: 15deg; transform-origin: top left">…</div>A common use is a chevron that turns when its group opens:
.chevron { rotate: var(--rotate, 90deg); transition: rotate var(--nc-duration-fast) var(--nc-ease-standard);}Motion and breakpoints
Section titled “Motion and breakpoints”Rotation has no breakpoint variants. Animated rotation should be short and should
respect prefers-reduced-motion; see Motion.
Because the utilities use rotate:, an animation on transform will not cancel
them. If you need both, keep them in separate properties.