React-Spring 3 useSpringValue(), useChain(), useTrail() indeterpolation and Parallax.
//It doesn't require the API call
//it won't trigger on the updated component, we must use its methods.
let valore = useSpringValue(0, {
config: config.wobbly,
})
let valore1 = useSpringValue(0, {
config:{ mass: 20, friction: 3, tension: 10 },
})
function starto(){
valore.start(300)
valore1.start(300)
}
<div>
<animated.div className="barra1" style={{ width: valore }} >
</animated.div>
<animated.div className="barra2" style={{ width: valore1 }} >
</animated.div>
</div>
Animation sequences with useChain()


Staggering animations with useTrail()


Scroll sections with Parallax and ParallaxLayers.


Sticky ParallaxLayers, SVG images, and backgrounds

PreviousReact-Spring-2 useTransition() update style, useGesture() drag, SVG display and useSpring() animationNextParallax
Last updated