transition prop on EaseView controls how animated property changes are played. It accepts either a single transition config applied to all properties, or a per-property map for fine-grained control.
transition is omitted, the default is a timing animation of 300ms with easeInOut easing.
TimingTransition
Animates from one value to another over a fixed duration using an easing curve.Must be
'timing' to use a timing transition.Duration of the animation in milliseconds.
Easing curve for the animation. Accepts a preset name or a
For custom curves, pass a
[x1, y1, x2, y2] cubic bezier tuple.Available presets:| Preset | Description | Bezier |
|---|---|---|
'linear' | Constant speed | [0, 0, 1, 1] |
'easeIn' | Starts slow, accelerates | [0.42, 0, 1, 1] |
'easeOut' | Starts fast, decelerates | [0, 0, 0.58, 1] |
'easeInOut' | Slow start and end, fast middle | [0.42, 0, 0.58, 1] |
[x1, y1, x2, y2] tuple matching the CSS cubic-bezier() function. x values must be between 0 and 1; y values can exceed this range for overshoot effects.Delay in milliseconds before the animation starts. Useful for staggering animations across multiple elements.
Enables infinite looping for timing animations. Requires
initialAnimate to define the start value.'repeat'— restarts the animation frominitialAnimatevalues each cycle'reverse'— alternates direction each cycle (forward, backward, forward, …)
Loop only works with timing animations. Spring transitions do not support looping.
SpringTransition
Animates using a physics-based spring model. Great for interactive elements where natural, organic motion is desired. Spring animations have no fixed duration — they settle when the physics simulation reaches equilibrium.Must be
'spring' to use a spring transition.Friction applied to the spring. Higher values reduce oscillation and cause the animation to settle faster. Very high values (e.g.,
100) produce a critically damped motion with no bounce.Spring constant. Higher values produce a stiffer, faster animation. Lower values produce a softer, slower motion.
Mass of the animated object. Higher values produce slower animation with more momentum and overshoot. Lower values produce lighter, snappier motion.
Delay in milliseconds before the spring animation starts.
Spring presets
NoneTransition
Applies values instantly without any animation.onTransitionEnd fires immediately with { finished: true }.
Useful for respecting reduced-motion preferences or resetting state without animation.
Must be
'none'. No other properties are accepted.TransitionMap
Pass an object (without atype key) to configure different transitions per property category. Any category not explicitly listed falls back to the default config — or to the library default (timing 300ms easeInOut) if default is also omitted.
Fallback transition for any property category not explicitly listed in the map.
Transition config for all transform properties:
translateX, translateY, scaleX, scaleY, rotate, rotateX, rotateY.Transition config for
opacity.Transition config for
borderRadius.Transition config for
backgroundColor.TransitionMap example
Default transition
When notransition prop is provided, all properties use:
Related
- EaseView — the component that accepts the
transitionprop - AnimateProps — the properties being animated
- Types — full TypeScript type reference