react-native-fs-modal
React native full screen modal component.
Demo
Usage
NOTE: If you are using the native status bar you will need to combine this plugin with the react-native-overlay plugin
Using ref
/** * Two methods show/hide */ { thisrefsmodal;} { thisrefsmodal;} ... <Modal // Use ref to allow open/close ref='modal' // Duration of animation (defaults 500) duration=1000 // Any tween function (defaults 'easeOutBack') tween='easeOutElastic' // Pass styles to modal modalStyle=borderRadius: 0 // Hide/show UIStatusBar (defaults to true) hideStatusBar=true > // Your modal's content <View style=themepadder> <Button onPress=thishideModal text='Close modal'/> </View></Modal>
Using a child component
<Modal> /** * The hide func will be added to SomeComponent's props. * This will allow you to add close buttons from within * the modal's view. */ <SomeComponent /></Modal>