Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

react-native-fs-modal

React native full screen modal component.

Demo

React Native Modal Component GIF

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
 */

showModal () {
  this.refs.modal.show();
}

hideModal () {
  this.refs.modal.close();
}

...

<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}
  // close modal when touch underlay
  closeOnTouch={true}
  >

  // Your modal's content
  <View style={theme.padder}>
    <Button
      onPress={this.hideModal.bind(this)}
      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>

About

React native full screen modal component.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.