React Native Driver
Spring-based animations using React Native Animated
This native-only driver connects Tamagui to React Native’s Animated library.
Web applications should use the CSS, Motion, or Reanimated driver.
Installation
yarn
npm
bun
pnpm
Configuration
Add it 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.
Animation configuration
React Native animations are springs, written as a duration and a bounce:
Spring parameters
duration: the spring’s undamped period in milliseconds, defining how fast the animation feels. It is not a fixed cutoff: a bouncy spring continues oscillating past it.bounce: 0 is critically damped, values toward 1 oscillate, and negative values produce an overdamped spring.
stiffness, damping, and mass still work for a config already tuned against
them, and velocity, overshootClamping, and the rest thresholds pass through
to Animated.spring.
Delay
The delay is specified in milliseconds and uses Animated.delay() internally to
sequence animations.
When to use
Advantages on native:
- Built-in: no additional external animation library needed
- Spring physics: natural, physics-based motion
- Reliable: uses core React Native Animated
Limitations:
- Less advanced than Reanimated
- Not available on web
Platform-specific configuration
You can use different drivers on web vs native using platform-specific file extensions:
Then import without the extension:
Your bundler will automatically pick the right file based on the platform.