Overview
No complex animation logic required. Use your favorite classNames to trigger high-performance animations. Our translation layer ensures that your animations remain performant, responsive and 100% native.
Uniwind Pro integrates seamlessly with react-native-reanimated (v4.0.0+) to provide CSS-like animations and transitions using Tailwind classes. Instead of using the style prop with Reanimated, you can use className to animate your components.
Uniwind Pro requires Reanimated v4.0.0 or higher for animation support.
How It Works
When you use animate-* or transition-* classes, Uniwind automatically:
- Detects animation/transition properties in your
className
- Sets
isAnimated: true on the style result
- Swaps the native component for its Reanimated equivalent (e.g.,
View → Animated.View)
- Applies CSS animations via Reanimated’s CSS animation support
No manual setup required - just use the classes and Uniwind handles the rest.
Keyframe Animations
Built-in Tailwind keyframe animations work out of the box:
import { View, Text, Pressable } from 'react-native'
// Spin animation (360° rotation loop)
<View className="size-32 bg-lime-500 rounded animate-spin" />
// Bounce animation (vertical bounce)
<View className="size-32 bg-lime-500 rounded animate-bounce" />
// Pulse animation (opacity fade in/out)
<View className="size-32 bg-lime-500 rounded animate-pulse" />
// Ping animation (scale + fade out)
<View className="size-32 bg-lime-500 rounded animate-ping" />
// Works on most components
<Pressable className="size-32 bg-base rounded-xl animate-spin" />
// iOS only (no Android support from Reanimated)
<Text className="text-default animate-spin">Spinning Text</Text>
Transitions
Animate property changes smoothly when className or state changes:
import { View, Pressable } from 'react-native'
// Transition colors on press
<Pressable
className="size-32 bg-base rounded-xl active:bg-primary transition-colors duration-500"
/>
// Transition opacity
<View
className={`size-32 bg-sky-800 rounded transition-opacity duration-1000 ${
isVisible ? 'opacity-100' : 'opacity-0'
}`}
/>
// Transition transform
<View
className={`size-32 bg-sky-800 rounded transition-transform duration-1000 ${
isLeft ? '-translate-x-full' : 'translate-x-full'
}`}
/>
// Transition all properties
<View
className={`size-32 rounded transition-all duration-1000 border-8 ${
state
? '-translate-x-full bg-lime-500 border-red-500 rounded-[64px]'
: 'translate-x-full bg-red-500 border-lime-500 rounded-none'
}`}
/>
Supported Animation Classes
Keyframe Animations
| Class | Description |
|---|
animate-spin | 360° rotation loop |
animate-bounce | Vertical bounce effect |
animate-pulse | Opacity fade in/out |
animate-ping | Scale up + fade out |
Transition Properties
| Class | Properties Animated |
|---|
transition-none | No transition |
transition-all | All properties |
transition-colors | Background, border, text colors |
transition-opacity | Opacity |
transition-shadow | Box shadow |
transition-transform | Transform (scale, rotate, translate) |
Duration
| Class | Duration |
|---|
duration-75 | 75ms |
duration-100 | 100ms |
duration-150 | 150ms |
duration-200 | 200ms |
duration-300 | 300ms |
duration-500 | 500ms |
duration-700 | 700ms |
duration-1000 | 1000ms |
Timing Functions
| Class | Easing |
|---|
ease-linear | Linear |
ease-in | Ease in |
ease-out | Ease out |
ease-in-out | Ease in-out |
| Class | Delay |
|---|
delay-75 | 75ms |
delay-100 | 100ms |
delay-150 | 150ms |
delay-200 | 200ms |
delay-300 | 300ms |
delay-500 | 500ms |
delay-700 | 700ms |
delay-1000 | 1000ms |
Using Reanimated Directly
You can also use Reanimated’s Animated.* components directly with Uniwind classes:
import Animated, { FadeIn, FlipInXUp, LinearTransition } from 'react-native-reanimated'
// Entering/exiting animations
<Animated.Text
entering={FadeIn.delay(500)}
className="text-foreground text-lg"
>
Fading in text
</Animated.Text>
// Animated FlatList with entering animations per item
<Animated.FlatList
data={data}
className="flex-none"
contentContainerClassName="px-2"
layout={LinearTransition}
ItemSeparatorComponent={() => (
<Animated.View className="h-px bg-border" />
)}
renderItem={({ item }) => (
<Animated.Text
entering={FlipInXUp}
className="text-foreground py-2"
>
{item}
</Animated.Text>
)}
/>
Components Supporting Animations
These components automatically switch to Reanimated versions when animation classes are detected:
| Component | Animated Version |
|---|
View | Animated.View |
Text | Animated.Text |
Image | Animated.Image |
ImageBackground | Animated.ImageBackground |
ScrollView | Animated.ScrollView |
FlatList | Animated.FlatList |
TextInput | Animated.TextInput (iOS only) |
Pressable | Animated.View wrapper |
Practical Examples
import { Pressable, Text } from 'react-native'
<Pressable
className="px-6 py-3 bg-blue-500 rounded-lg active:scale-95 active:bg-blue-600 transition-all duration-150"
>
<Text className="text-white font-semibold">Press Me</Text>
</Pressable>
Interactive Card
import { Pressable, Text } from 'react-native'
<Pressable
className="p-4 bg-white rounded-xl active:scale-95 transition-transform duration-150"
>
<Text className="text-gray-800">Interactive Card</Text>
</Pressable>
Disabled State with Transition
import { Pressable, Text } from 'react-native'
<Pressable
disabled={isLoading}
className="px-6 py-3 bg-blue-500 disabled:bg-gray-300 rounded-lg transition-colors duration-300"
>
<Text className="text-white">Submit</Text>
</Pressable>
Loading Spinner
import { View } from 'react-native'
<View className="size-8 border-4 border-gray-200 border-t-blue-500 rounded-full animate-spin" />