--- name: transform-rotate description: Rotating elements in 2D and 3D space with degree values and custom rotations --- # Rotate Utilities for rotating elements. ## Usage ### 2D rotation Use `rotate-` to rotate by degrees: ```html
45 degrees
90 degrees
-45 degrees (counterclockwise)
``` ### 3D rotation Use `rotate-x-`, `rotate-y-`, `rotate-z-` for 3D rotation: ```html
3D rotation
Combined 3D rotation
``` ### Common rotations ```html
Quarter turn
Half turn
Three-quarter turn
``` ### Custom values Use arbitrary values for custom rotations: ```html
Custom radian rotation
Explicit degree rotation
``` ### Removing rotation Use `rotate-none` to remove rotation: ```html
Rotated on mobile only
``` ## Key Points - `rotate-*` rotates in 2D plane (around z-axis) - `rotate-x-*` rotates around x-axis (3D) - `rotate-y-*` rotates around y-axis (3D) - `rotate-z-*` rotates around z-axis (3D, same as `rotate-*`) - Negative values rotate counterclockwise: `-rotate-45` - Common values: `45`, `90`, `180`, `270` degrees - Can combine multiple axes: `rotate-x-50 rotate-y-30 rotate-z-45` - Use `rotate-none` to remove all rotations