Documentation
React Native
Bring motionwind's Tailwind-like animation classes to React Native with Reanimated.
React Native
motionwind for React Native lets you animate mobile apps using the same animate-* class syntax you already know from the web — powered by react-native-reanimated for 60fps native animations.
Welcome Card — Staggered EntranceNative
9:41
Why motionwind on React Native?
- Same API — Write
animate-hover:scale-110on web andanimate-tap:scale-95on mobile. One mental model, two platforms. - Reanimated under the hood — Animations run on the UI thread, not JavaScript. Zero dropped frames.
- NativeWind compatible — Non-animation Tailwind classes pass through to NativeWind automatically.
- Runtime parsing — No build-time Babel step needed. The
mw.*component proxy parses classes at runtime with an LRU cache.
How it works
import { mw } from "motionwind-react-native";
<mw.Pressable className="animate-tap:scale-95 animate-duration-150 bg-blue-500 p-4 rounded-xl">
<mw.Text className="text-white font-bold">Press me</mw.Text>
</mw.Pressable>The mw.Pressable component:
- Parses the className string, separating
animate-*tokens from regular classes - Creates Reanimated shared values for each animated property (
scale) - Maps gestures to RN handlers (
animate-tap:→onPressIn/onPressOut) - Passes remaining classes (
bg-blue-500 p-4 rounded-xl) to NativeWind viaclassName
Tap to Scale — Press InteractionNative
9:41
Web vs. Native differences
| Feature | Web (motionwind-react) | Native (motionwind-react-native) |
|---|---|---|
| Animation engine | motion/react (Framer Motion) | react-native-reanimated |
| Styling | Tailwind CSS | NativeWind (optional) |
whileHover | Mouse hover | onHoverIn/Out (RN 0.71+) |
whileTap | Click/touch | onPressIn/Out |
| CSS filters | blur(), brightness() | Not supported (dropped silently) |
| CSS units | vh, vw, rem, em | Plain numbers (device-independent pixels) |
x / y translate | CSS translate | RN translateX/translateY (auto-mapped) |
| Rotate values | Number (degrees) | String ("45deg") (auto-formatted) |
| Duration unit | Seconds (0.3) | Milliseconds (300) |
Next steps
- Installation — Set up your project
- Components — Learn about
mw.*components - Animations — Entrance, exit, and state animations
- Gestures — Tap, hover, and focus interactions
- Hooks —
useMotionwindanduseInViewfor custom control