Transforms
In addition to the default transform style properties provided by React Native. React Native for web also provides the following.
The API
The perspective
style property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property.
Type: number | string
number | string
Conversion
Determines the position at which the viewer is looking. It is used as the vanishing point by the perspective property.
Type: string
string
Conversion
The transformation origin is the point around which a transformation is applied. For example, the transformation origin of the rotate() function is the center of rotation. (This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.)
Type: string
string
Default: '50% 50%'
'50% 50%'
Conversion
Sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. If flattened, the element's children will not exist on their own in the 3D-space.
Type: 'flat' | 'preserve-3d'
'flat' | 'preserve-3d'
Conversion
Last updated