Home

Awesome

About

This package delivers a lightweight "pop up" modal that can be swiped right or left. Each direction can receive it's own function to do whatever you would like it to!

Screenshot Screenshot

Usage

Install

npm install --save swipeable-modal-react-native

Basic Set Up

import React, { Component } from 'react';
import { Text, View } from 'react-native';
import PopUp from 'swipeable-modal-react-native';

export default class Something extends Component {
  render() {
	return (
	  <View>
	    <PopUp>
	      {/*
	      	Put whatever you want to display in the modal here!
	      */}
	    </PopUp>
	  </View>
	)
  }
}

Under the default settings, a button will be rendered like such:

Screenshot

This can be disabled by props.

Props

  1. showButton
  2. buttonText
  3. buttonColor
  4. buttonContainerStyle
  5. buttonTextStyle
  6. modalTransparent
  7. modalOpen
  8. animatedViewStyle
  9. modalOpenAnimation
  10. onSwipeRight
  11. onSwipeLeft

1. showButton

2. buttonText

3. buttonColor

4. buttonContainerStyle

5. buttonTextStyle

6. modalTransparent

7. modalOpen

8. animatedViewStyle

	{
		backgroundColor: '#fff',
		borderRadius: 10,
		height: height-85,
		width: width-50,
		marginTop: 60,
		marginBottom: 25,
		marginLeft: 25,
		marginRight: 25,
	}

9. modalOpenAnimation

10. onSwipeLeft

11. onSwipeRight