AnimateProps defines the set of properties that EaseView can animate. All properties are set as flat values — there is no transform array like in standard React Native styles.
Properties not specified in animate default to their identity values (the value that produces no visible change — 0 for translations, 1 for scale, etc.).
Type definition
Properties
View opacity. Accepts values from
0 (fully transparent) to 1 (fully opaque).Horizontal translation in density-independent pixels. Positive values move the view right; negative values move it left.
Vertical translation in density-independent pixels. Positive values move the view down; negative values move it up.
Uniform scale factor applied to both axes.
1 is normal size, 0.5 is half size, 2 is double size.This is a shorthand that sets both scaleX and scaleY. If scaleX or scaleY is also provided, those values override scale for their respective axis.Horizontal scale factor. Overrides
scale for the X axis when both are specified.Vertical scale factor. Overrides
scale for the Y axis when both are specified.Z-axis rotation in degrees. Positive values rotate clockwise.
X-axis rotation in degrees (3D perspective flip around the horizontal axis). Positive values tip the top of the view away from the viewer.
Y-axis rotation in degrees (3D perspective flip around the vertical axis). Positive values tip the right side of the view away from the viewer.
Border radius in pixels. Uses hardware-accelerated clipping —
ViewOutlineProvider + clipToOutline on Android and layer.cornerRadius + layer.masksToBounds on iOS. Children are clipped to the rounded bounds.Unlike React Native’s style-based borderRadius (which uses a Canvas drawable on Android), this clips children correctly and is GPU-accelerated.When borderRadius is in animate, any borderRadius in style is automatically stripped to avoid conflicts.Background color. Accepts any React Native color value — hex strings, named colors,
rgb(), rgba(), etc.When backgroundColor is in animate, any backgroundColor in style is automatically stripped to avoid conflicts.Full example
Identity defaults
Properties omitted fromanimate use their identity values:
| Property | Identity value |
|---|---|
opacity | 1 |
translateX | 0 |
translateY | 0 |
scale | 1 |
scaleX | 1 |
scaleY | 1 |
rotate | 0 |
rotateX | 0 |
rotateY | 0 |
borderRadius | 0 |
backgroundColor | 'transparent' |
scale shorthand behavior
scale is a convenience shorthand. When only scale is specified, it applies equally to both axes:
scale and an explicit scaleX or scaleY are both provided, the explicit value wins for that axis:
Related
- EaseView — the component that accepts
animateandinitialAnimate - Transition — control the animation curve