
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
modal-react-native-web
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
This repository contains NPM Packages for React Native Modal Implementation for Web
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.
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.
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:
import React, { Component } from 'react';
import { Text, TouchableHighlight, View } from 'react-native';
import Modal from 'modal-react-native-web';
export default class Example extends Component {
state = {
modalVisible: false,
};
setModalVisible(visible) {
this.setState({modalVisible: visible});
}
render() {
return (
<View style={{marginTop: 22}}>
<Modal
animationType="slide"
transparent={false}
visible={this.state.modalVisible}
onDismiss={() => {
alert('Modal has been closed.');
}}>
<View style={{marginTop: 22}}>
<View>
<Text>Hello World!</Text>
<TouchableHighlight
onPress={() => {
this.setModalVisible(!this.state.modalVisible);
}}>
<Text>Hide Modal</Text>
</TouchableHighlight>
</View>
</View>
</Modal>
<TouchableHighlight
onPress={() => {
this.setModalVisible(true);
}}>
<Text>Show Modal</Text>
</TouchableHighlight>
</View>
);
}
}
Taken from React Native Modal Example with some changes
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 | - |
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
React native modal implementation for web
The npm package modal-react-native-web receives a total of 64,246 weekly downloads. As such, modal-react-native-web popularity was classified as popular.
We found that modal-react-native-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.