Motion Driver
High-performance web animations with WAAPI
Motion combines JavaScript animation controls with the Web Animations API for smooth, browser-native animation.
Installation
yarn
npm
bun
pnpm
Configuration
Add your animations to your Tamagui config:
The config format is the same for all four drivers, so a name means the same
motion whichever driver renders it. There is no need for '200ms'-style entries
any more: a duration is CSS, so transition="200ms" works with nothing
configured.
How it works
At runtime, the Motion driver uses the useAnimate() hook from the Motion
library to batch style changes and animate only what changed. It runs through
the Web Animations API (WAAPI), which animates on the compositor thread when
possible, keeping animations smooth even when the main thread is busy.
Animation configuration
Motion animations support both spring and timing animations:
Spring animations
stiffness, damping, and mass still work for a config already tuned against
them, and velocity, overshootClamping, and the rest thresholds pass through.
Timing animations
A plain CSS string means the same thing: '200ms ease-out'.
Delay
The delay is specified in milliseconds and is converted to seconds for Motion internally.
Highlights
Zero re-renders
The Motion driver bypasses internal style recalculations and hands off updates directly to Motion.
WAAPI performance
Off-thread performance comparable to Reanimated, but for web-only applications.
Platform-specific configuration
For cross-platform apps, use Motion on web and Reanimated on native:
Then import without the extension:
Your bundler will automatically pick the right file based on the platform.