What stays the same, what changes, and what the web adds.
The same calls
Controllers, graphs and configs follow React Native's Animated. Render DOM hosts such as Animated.div where React Native renders Animated.View. useAnimatedValue is available as in React Native.
Preparing the example…
Differences to know
These details keep ported code behaving the way it did on a device.
useNativeDriver and isInteraction are accepted. Playback is chosen per output instead: eligible outputs play in the browser, the rest in JavaScript.
spring accepts stiffness/damping/mass, bounciness/speed or tension/friction, with React Native's default when none is given.
interpolate supports easing and the three extrapolation modes.
Easing matches React Native, including elastic. Easing.exp is rescaled by 0.1% to start exactly at 0 so it can use browser playback.
Decay velocity is in units per millisecond and spring velocity in units per second, as in React Native.
Animated.createAnimatedComponent wraps a ref-forwarding component.
Ordinary React style accepts hook values directly, seed/pose/respond describe destinations and gestures, and Animated.Keep and Animated.Scene handle departures and layout.