Starts a time based animation.
toValue [number | string]#
The target value at which the animation should conclude.
It can be specified as a color value by providing string like:
rgba(255, 105, 180, 0).
Currently supported formats are:
"rgb(r, g, b)"
"rgba(r, g, b, a)"
"hsl(h, s, l)"
"hsla(h, s, l, a)"
Object containing animation configuration. Allowed parameters are listed below:
|duration||300||How long the animation should last|
|easing||in-out quad easing||Worklet that drives the easing curve for the animation|
easing parameter we recommend using one of the pre-configured worklets defined in
The provided function will be called when the animation is complete.
In case the animation is cancelled, the callback will receive
false as the argument, otherwise it will receive
This method returns an animation object. It can be either assigned directly to a Shared Value or can be used as a value for a style object returned from