React Native Web Modal
React Native Web Modal
This repository contains NPM Packages for React Native Modal Implementation for Web
Inspiration
React Native Modal is not yet implemented in React Native Web. This is just replacement of React Native Modal with the same API, behavior, and design.
Setup
This libraries is available on npm, install it with: npm install --save modal-react-native-web
or yarn add modal-react-native-web
for the basic modal.
Usage
Since react native web modal is an implementation of the original react native modal, it works in similar fashions with react-native modal. But of course, some APIs are limited (not all props are suppported).
Here's example code:
;; ; state = modalVisible: false ; { this; } { return <View style=marginTop: 22> <Modal animationType="slide" transparent=false visible=thisstatemodalVisible onDismiss= { ; }> <View style=marginTop: 22> <View> <Text>Hello World!</Text> <TouchableHighlight onPress= { this; }> <Text>Hide Modal</Text> </TouchableHighlight> </View> </View> </Modal> <TouchableHighlight onPress= { this; }> <Text>Show Modal</Text> </TouchableHighlight> </View> ; }
Taken from React Native Modal Example with some changes
Packages
React Native Web Modal |
Enhanced Modal React Native Web |
|
---|---|---|
NPM | ||
Description | React Native Modal implemented for Web. Implemented using React Native Web Animated and React DOM Portal |
Enhanced Version of React Native Modal, implemented for web |
Inspired by | RNW Modal by Kiurchv |
React Native Modal by React Native Community MIT License by React Native Community |
Not yet supported |
- onRequestClose - supportedOrientations - hardwareAccelerated - onOrientationChange - presentationStyle |
- |
Author
- Ray Andrew - Ray Andrew
Special Thanks
- Natan Elia - Natan Elia
- Louis David - Louis David
License
This project is licensed under the MIT License - see the LICENSE.md file for details