Skip to main content
Animates the opacity and scale of an element. in transitions animate from the provided values to an element’s default values. out transitions animate from an element’s default values to the provided values.

Usage

Parameters

delay
number
default:"0"
Milliseconds before starting the transition
duration
number
default:"400"
Duration of the transition in milliseconds
easing
function
default:"cubicOut"
An easing function that controls the animation curve
start
number
default:"0"
The scale value to animate from/to (where 1 is the element’s natural size). A value of 0 makes the element invisible, 0.5 makes it half-size, and 2 makes it double-size
opacity
number
default:"0"
The target opacity value (between 0 and 1) when the element is fully transitioned out

Example with parameters