Example
Reference
Transform
transform accepts an array of transformation objects or space-separated string values. Each object specifies the property that will be transformed as the key, and the value to use in the transformation. Objects should not be combined. Use a single key/value pair per object.
The rotate transformations require a string so that the transform may be expressed in degrees (deg) or radians (rad). For example:
Matrix Transform
Thematrix transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
The matrix is specified in column-major order:
decomposedMatrix, rotation, scaleX, scaleY, transformMatrix, translateX, translateY
Transform Origin
ThetransformOrigin property sets the origin for a view’s transformations. The transform origin is the point around which a transformation is applied. By default, the origin of a transform is center.
Example
Values
Transform origin supportspx, percentage and keywords top, left, right, bottom, center values.
The transformOrigin property may be specified using one, two, or three values, where each value represents an offset.
One-value syntax:
- The value must be a
px, apercentage, or one of the keywordsleft,center,right,top, andbottom.
Two-value syntax:
- First value (x-offset) must be a
px, apercentage, or one of the keywordsleft,center, andright. - The second value (y-offset) must be a
px, apercentage, or one of the keywordstop,center, andbottom.
Three-value syntax:
- The first two values are the same as for the two-value syntax.
- The third value (z-offset) must be a
px. It always represents the Z offset.
Array syntax
transformOrigin also supports an array syntax. It makes it convenient to use it with Animated APIs. It also avoids string parsing, so should be more efficient.

