react-native-modal extends React Native’s Modal with enter and exit animations, configurable backdrops, swipe gestures, and scrollable content patterns while keeping a simple isVisible API.
Overview
The component wraps the core React Native modal with animation presets from react-native-animatable, customizable backdrop timing and opacity, and lifecycle callbacks for show and hide transitions. Props cover device rotation handling, keyboard avoidance, and swipe-to-close thresholds.
Scrollable content examples demonstrate coordinating pan responders with nested ScrollViews. Custom backdrops can replace the default view but need explicit sizing and press handlers if dismissal on backdrop tap is required.
Installation is through npm or yarn. Documentation lists extensive animation names and troubleshooting tips for flicker when mismatched enter and exit animations are chosen.
The API centers on the isVisible boolean controlled by parent state, mirroring idiomatic React patterns with optional imperative helpers in the example app.
Key features
- Animated show and hide transitions
- Configurable backdrop color and opacity
- Swipe and scroll gesture support
- Keyboard avoidance option
- Device rotation resize handling
- Rich callback lifecycle hooks
- Animatable-powered effect library
- Simple isVisible control prop
Use cases
- Action sheets and confirmations
- Multi-step mobile forms in overlays
- Gallery or picker dialogs
- Bottom sheets with swipe dismiss
- Scrollable legal or help content