ReferenceBehaviorsType
Easing
Reshapes progress to make transitions start or end softly.
type Easing = (t: number) => number;A function that reshapes progress from 0 to 1, used by behaviors like fade() and scale() to make a transition start or end softly.
It receives a progress t from 0 to 1 and returns the eased value. It is expected to return 0 at t = 0
and 1 at t = 1. In between, its shape determines how fast the transition moves.
Parameters
Section titled “Parameters”tnumberThe received progress from 0 to 1.
Returns
Section titled “Returns”numberThe reshaped progress.
Example
Section titled “Example”// A custom ease that starts even more slowly than sineIn.const cubicIn: Easing = (t) => t ** 3;fade(0.2, 0.5, cubicIn);