Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thanhtunguet/react-native-slidingup-modal
SlidingUp modal for React Native
https://github.com/thanhtunguet/react-native-slidingup-modal
Last synced: 23 days ago
JSON representation
SlidingUp modal for React Native
- Host: GitHub
- URL: https://github.com/thanhtunguet/react-native-slidingup-modal
- Owner: thanhtunguet
- License: mit
- Created: 2020-12-07T08:21:43.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-07T08:24:59.000Z (about 4 years ago)
- Last Synced: 2024-02-25T08:04:26.181Z (10 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-slidingup-modal
SlidingUp modal for React Native
## Installation
```sh
npm install react-native-slidingup-modal
```## Usage
```js
import * as React from 'react';
import {
SafeAreaView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import ReactNativeSlidingUpModal from 'react-native-slidingup-modal';export default function App() {
const [visible, setVisible] = React.useState(false);const handleToggleVisible = React.useCallback(() => {
setVisible(!visible);
}, [visible]);const handleRequestClose = React.useCallback(() => {
setVisible(false);
}, []);return (
<>
Toggle modal
Modal content
>
);
}const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#ffffff',
},
modalStyle: {
marginTop: 60,
borderTopLeftRadius: 25,
borderTopRightRadius: 25,
paddingTop: 16,
paddingLeft: 16,
paddingRight: 16,
},
});```
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT