Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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