8.6 Released with 🥽 visionOS support and more!
Check it out
AnimationDefinition
interface AnimationDefinition {
  backgroundColor: Color;
  curve: any;
  delay: number;
  duration: number;
  height: string | number | LengthDipUnit | LengthPxUnit | LengthPercentUnit;
  iterations: number;
  opacity: number;
  rotate: number | Point3D;
  scale: Pair;
  target: View;
  translate: Pair;
  width: string | number | LengthDipUnit | LengthPxUnit | LengthPercentUnit;
}
Defines animation options for the View.animate method.

Summary ​

Properties ​

backgroundColor ​

backgroundColor?: Color
Animates the backgroundColor of the view.

curve ​

curve?: any
An optional animation curve. Possible values are contained in the [AnimationCurve enumeration](../modules/_ui_enums_.animationcurve.html). Alternatively, you can pass an instance of type UIViewAnimationCurve for iOS or android.animation.TimeInterpolator for Android.

delay ​

delay?: number
The amount of time, in milliseconds, to delay starting the animation.

duration ​

duration?: number
The length of the animation in milliseconds. The default duration is 300 milliseconds.

height ​

height?: string | number | LengthDipUnit | LengthPxUnit | LengthPercentUnit
Animates the height of a view.

iterations ​

iterations?: number
Specifies how many times the animation should be played. Default is 1. iOS animations support fractional iterations, i.e. 1.5. To repeat an animation infinitely, use Number.POSITIVE_INFINITY

opacity ​

opacity?: number
Animates the opacity of the view. Value should be a number between 0.0 and 1.0

rotate ​

rotate?: number | Point3D
Animates the rotate affine transform of the view. Value should be a number specifying the rotation amount in degrees.

scale ​

scale?: Pair
Animates the scale affine transform of the view.

target ​

target?: View
The view whose property is to be animated.

translate ​

translate?: Pair
Animates the translate affine transform of the view.

width ​

width?: string | number | LengthDipUnit | LengthPxUnit | LengthPercentUnit
Animates the width of a view.