Overview
React-native-screen-transitions provides several specialized stack types for different navigation patterns. Each type optimizes for specific use cases.Transition.Stack
The primary stack navigator for sequential screen navigation:- Push/pop navigation flow
- Deep linking
- Back button navigation
- Standard mobile navigation patterns
Standalone Usage (NEW in 3.4)
Transition.Stack can now be used independently with options:
independent?: boolean- Standalone operation without parent navigator contextenableNativeScreens?: boolean- Toggle between native screens and regular views
Transition.Modal
Modal navigator for overlay presentations:- Bottom sheets
- Fullscreen modals
- Overlays with snap points
- Dismissible screens
Snap Point Variations
Transition.NativeStack
Native-backed stack with enhanced platform features:- Native platform headers
- Back button customization
- Large title styling (iOS)
- Status bar integration
Transition.BottomTabs
Tab navigator with animated transitions:- Bottom tab navigation
- Top tab navigation
- Horizontal tab switching
- Multi-tab apps
Transition.Drawer
Drawer navigator with slide animations:- Side menu navigation
- App drawer
- Navigation list
- Multi-section apps
Navigation Nesting
Combine stack types for complex hierarchies:Header Configuration
Control header appearance per stack type:Safe Area Handling
Automatically handles safe areas for notches, rounded corners, etc.:Gesture Handling by Stack Type
Different stack types have different default gesture behaviors:| Stack Type | Default Gesture | Direction |
|---|---|---|
Stack | Slide | Horizontal (iOS), Vertical (Android) |
Modal | Swipe | Vertical |
NativeStack | Platform default | Platform-dependent |
BottomTabs | Tab switch | Horizontal |
Drawer | Slide | Horizontal |
gestureEnabled and gestureDirection options.
Animation Presets by Stack Type
Each stack type has optimized animation presets:Standalone Stack Usage (NEW in 3.4)
UseTransition.Stack outside of navigation hierarchy:
- Demo screens
- Tutorial flows
- Custom navigation UIs
- Embedded transitions
Comparison Table
| Stack Type | Use Case | Orientation | Header |
|---|---|---|---|
| Stack | Sequential push/pop | Both | Custom or native |
| Modal | Overlay sheets | Vertical | Minimal/none |
| NativeStack | Native-backed nav | Both | Native |
| BottomTabs | Tab switching | Horizontal | Optional |
| Drawer | Side menu | Horizontal | Optional |
Best Practices
- Use appropriate stack type: Each type optimizes for its use case
- Limit nesting depth: 3-4 levels max for best performance
- Consistent gestures: Use same gesture direction across related stacks
- Test on both platforms: Gesture behavior varies between iOS and Android
- Consider safe areas: Use safe area insets for notch/rounded corner handling
Next Steps
- Explore custom animations for interpolators
- Learn gestures for interaction control
- See transition components for detailed API reference
